mirror of
https://github.com/nasa/openmct.git
synced 2025-01-20 19:49:17 +00:00
a0f31132e3
WTD-847 Significant markup and CSS for color palette support;
43 lines
1.9 KiB
HTML
43 lines
1.9 KiB
HTML
<div class="t-fixed-position l-fixed-position"
|
|
ng-controller="FixedController as controller"
|
|
mct-resize="controller.setBounds(bounds)">
|
|
|
|
<!-- Background grid -->
|
|
<div class="l-grid-holder" ng-click="controller.clearSelection()">
|
|
<div class="l-grid l-grid-x" ng-style="{ 'background-size': controller.getGridSize() [0] + 'px 100%' }"></div>
|
|
<div class="l-grid l-grid-y" ng-style="{ 'background-size': '100% ' + controller.getGridSize() [1] + 'px' }"></div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Fixed position elements -->
|
|
<!-- TO-DO: Should not be applying positioning styles or CSS classes to the mct-include element.
|
|
Instead, these should be passed on to the actual HTML element within the template -->
|
|
<mct-include ng-repeat="element in controller.getElements()"
|
|
key="element.template"
|
|
parameters="{ gridSize: controller.getGridSize() }"
|
|
class="l-fixed-position-item"
|
|
ng-class="{ 's-not-selected': controller.selected() && !controller.selected(element) }"
|
|
ng-style="element.style"
|
|
ng-click="controller.select(element)"
|
|
ng-model="element">
|
|
</mct-include>
|
|
|
|
<!-- Selection highlight, handles -->
|
|
<span ng-if="controller.selected()">
|
|
<div class="l-fixed-position-item s-selected"
|
|
mct-drag-down="controller.moveHandle().startDrag(controller.selected())"
|
|
mct-drag="controller.moveHandle().continueDrag(delta)"
|
|
mct-drag-up="controller.moveHandle().endDrag()"
|
|
ng-style="controller.selected().style">
|
|
</div>
|
|
<div ng-repeat="handle in controller.handles()"
|
|
class="l-fixed-position-item-handle"
|
|
ng-style="handle.style()"
|
|
mct-drag-down="handle.startDrag()"
|
|
mct-drag="handle.continueDrag(delta)"
|
|
mct-drag-up="handle.endDrag()">
|
|
</div>
|
|
</span>
|
|
|
|
</div> |