mirror of
https://github.com/nasa/openmct.git
synced 2025-01-22 12:28:09 +00:00
fa4cfc4961
WTD-894 Added scss file for fixed position styles; Mods in progress to fixed.html to remove inline styling and change grid method to background gradient approach;
47 lines
1.9 KiB
HTML
47 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 -->
|
|
<span ng-click="controller.clearSelection()">
|
|
<!--div ng-repeat="cell in controller.getCellStyles()"
|
|
class="l-grid-cell s-grid-cell"
|
|
ng-style="cell">
|
|
</div-->
|
|
<span class="s-grid l-grid-x" ng-style="{ 'background-size': controller.getGridSize() [0] + 'px 100%' }"></span>
|
|
<span class="s-grid l-grid-y" ng-style="{ 'background-size': '100% ' + controller.getGridSize() [1] + 'px' }"></span>
|
|
</span>
|
|
|
|
|
|
|
|
<!-- Fixed position elements -->
|
|
<mct-include ng-repeat="element in controller.getElements()"
|
|
style="position: absolute;"
|
|
key="element.template"
|
|
parameters="{ gridSize: controller.getGridSize() }"
|
|
ng-class="{ disabled: 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="s-fixed-position-item-selected"
|
|
style="position: absolute;"
|
|
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()"
|
|
style="position: absolute;"
|
|
ng-style="handle.style()"
|
|
mct-drag-down="handle.startDrag()"
|
|
mct-drag="handle.continueDrag(delta)"
|
|
mct-drag-up="handle.endDrag()">
|
|
O
|
|
</div>
|
|
</span>
|
|
|
|
</div> |