| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-resizable-behavior
/iron-resizable-behavior.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-resizable-behavior
/iron-resizable-behavior.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 4 <link rel="import" href="/device_page/drag_behavior.html"> | 4 <link rel="import" href="/device_page/drag_behavior.html"> |
| 5 <link rel="import" href="/device_page/layout_behavior.html"> | 5 <link rel="import" href="/device_page/layout_behavior.html"> |
| 6 <link rel="import" href="/settings_shared_css.html"> | 6 <link rel="import" href="/settings_shared_css.html"> |
| 7 | 7 |
| 8 <dom-module id="display-layout"> | 8 <dom-module id="display-layout"> |
| 9 <template> | 9 <template> |
| 10 <style include="settings-shared"> | 10 <style include="settings-shared"> |
| 11 /* Use relative position with no offset so that display divs (children), | 11 /* Use relative position with no offset so that display divs (children), |
| 12 which have absolute positions, are offset from the displayArea div. */ | 12 which have absolute positions, are offset from the displayArea div. */ |
| 13 #displayArea { | 13 #displayArea { |
| 14 border: lightgrey solid 1px; | 14 border: lightgrey solid 1px; |
| 15 height: 100%; | 15 height: 100%; |
| 16 position: relative; | 16 position: relative; |
| 17 width: 100%; | 17 width: 100%; |
| 18 } | 18 } |
| 19 /* Note: the size of the border / box shadow affects the style generated |
| 20 in getDivStyle_ and getMirrorDivStyle_ */ |
| 19 .display { | 21 .display { |
| 20 align-items: center; | 22 align-items: center; |
| 21 background: var(--paper-grey-200); | 23 background: var(--paper-grey-200); |
| 22 border: var(--paper-grey-200) solid 1px; | 24 border: var(--paper-grey-200) solid 1px; |
| 23 box-shadow: 2px 2px var(--paper-grey-400); | 25 box-shadow: 2px 2px var(--paper-grey-400); |
| 24 cursor: default; | 26 cursor: default; |
| 25 display: flex; | 27 display: flex; |
| 26 justify-content: center; | 28 justify-content: center; |
| 27 position: absolute; | 29 position: absolute; |
| 28 } | 30 } |
| 29 .display[selected] { | 31 .display[selected] { |
| 30 border: var(--google-blue-500) solid 2px; | 32 border: var(--google-blue-500) solid 2px; |
| 31 box-shadow: none; | 33 box-shadow: none; |
| 32 } | 34 } |
| 35 .display.mirror { |
| 36 border: var(--google-blue-500) solid 1px; |
| 37 box-shadow: none; |
| 38 } |
| 33 .highlight-left { | 39 .highlight-left { |
| 34 border-left: var(--google-blue-700) solid 1px; | 40 border-left: var(--google-blue-700) solid 1px; |
| 35 } | 41 } |
| 36 .highlight-right { | 42 .highlight-right { |
| 37 border-right: var(--google-blue-700) solid 1px; | 43 border-right: var(--google-blue-700) solid 1px; |
| 38 } | 44 } |
| 39 .highlight-top { | 45 .highlight-top { |
| 40 border-top: var(--google-blue-700) solid 1px; | 46 border-top: var(--google-blue-700) solid 1px; |
| 41 } | 47 } |
| 42 .highlight-bottom { | 48 .highlight-bottom { |
| 43 border-bottom: var(--google-blue-700) solid 1px; | 49 border-bottom: var(--google-blue-700) solid 1px; |
| 44 } | 50 } |
| 45 </style> | 51 </style> |
| 46 <div id="displayArea" on-iron-resize="calculateVisualScale_"> | 52 <div id="displayArea" on-iron-resize="calculateVisualScale_"> |
| 47 <template is="dom-repeat" items="[[displays]]"> | 53 <template is="dom-repeat" items="[[displays]]"> |
| 48 <div id="_[[item.id]]" class="display" draggable="true" | 54 <div id="_mirror_[[item.id]]" class="display mirror" |
| 55 hidden$="[[!mirroring]]" |
| 56 style$="[[getMirrorDivStyle_(item.id, item.bounds, visualScale)]]" |
| 57 </div> |
| 58 </template> |
| 59 <template is="dom-repeat" items="[[displays]]"> |
| 60 <div id="_[[item.id]]" class="display" draggable="[[dragEnabled]]" |
| 49 style$="[[getDivStyle_(item.id, item.bounds, visualScale)]]" | 61 style$="[[getDivStyle_(item.id, item.bounds, visualScale)]]" |
| 50 selected$="[[isSelected_(item, selectedDisplay)]]" | 62 selected$="[[isSelected_(item, selectedDisplay)]]" |
| 51 on-tap="onSelectDisplayTap_"> | 63 on-tap="onSelectDisplayTap_"> |
| 52 [[item.name]] | 64 [[item.name]] |
| 53 </div> | 65 </div> |
| 54 </template> | 66 </template> |
| 55 </div> | 67 </div> |
| 56 </template> | 68 </template> |
| 57 <script src="display_layout.js"></script> | 69 <script src="display_layout.js"></script> |
| 58 </dom-module> | 70 </dom-module> |
| OLD | NEW |