Commit 8cbea5ec authored by Steven Bennetts's avatar Steven Bennetts Committed by Commit Bot

Settings > Display: Use a single div

Using a separate name div breaks dragging when the name is dragged
and isn't necessary.

Bug: 833036
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ia9bcc8556018e9dd6d76e0dac6221ecbf85997c7
Reviewed-on: https://chromium-review.googlesource.com/1014624
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarWeidong Guo <weidongg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551426}
parent 35c8765c
...@@ -70,12 +70,8 @@ ...@@ -70,12 +70,8 @@
draggable="[[dragEnabled]]" on-click="onSelectDisplayTap_" draggable="[[dragEnabled]]" on-click="onSelectDisplayTap_"
style$="[[getDivStyle_(item.id, item.bounds, visualScale)]]" style$="[[getDivStyle_(item.id, item.bounds, visualScale)]]"
selected$="[[isSelected_(item, selectedDisplay)]]"> selected$="[[isSelected_(item, selectedDisplay)]]">
<div hidden$="[[mirroring]]"> [[getDisplayName_(mirroring, item.name,
[[item.name]] '$i18nPolymer{displayMirrorDisplayName}')]]
</div>
<div hidden$="[[!mirroring]]">
$i18n{displayMirrorDisplayName}
</div>
</div> </div>
</template> </template>
</div> </div>
......
...@@ -190,6 +190,17 @@ Polymer({ ...@@ -190,6 +190,17 @@ Polymer({
(mirroringDestinationDisplayNum - mirroringDestinationIndex) * -4); (mirroringDestinationDisplayNum - mirroringDestinationIndex) * -4);
}, },
/**
* @param {boolean} mirroring
* @param {string} displayName
* @param {string} mirroringName
* @return {string}
* @private
*/
getDisplayName_: function(mirroring, displayName, mirroringName) {
return mirroring ? mirroringName : displayName;
},
/** /**
* @param {!chrome.system.display.DisplayUnitInfo} display * @param {!chrome.system.display.DisplayUnitInfo} display
* @param {!chrome.system.display.DisplayUnitInfo} selectedDisplay * @param {!chrome.system.display.DisplayUnitInfo} selectedDisplay
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment