openmct/platform/features/layout/res/templates/fixed.html

47 lines
1.9 KiB
HTML
Raw Normal View History

<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>