mirror of
https://github.com/nasa/openmct.git
synced 2024-12-30 09:58:52 +00:00
5e3d5fd00f
Initially implement handles for resizing elements in a fixed position view, WTD-882.
43 lines
1.6 KiB
HTML
43 lines
1.6 KiB
HTML
<div style="width: 100%; height: 100%; position: absolute; left: 0px; top: 0px;"
|
|
ng-controller="FixedController as controller"
|
|
mct-resize="controller.setBounds(bounds)">
|
|
|
|
<!-- Background grid -->
|
|
<span ng-click="controller.clearSelection()">
|
|
<div ng-repeat="cell in controller.getCellStyles()"
|
|
style="position: absolute; border: 1px gray solid; background: black;"
|
|
ng-style="cell">
|
|
</div>
|
|
</span>
|
|
|
|
<!-- Fixed position elements -->
|
|
<mct-include ng-repeat="element in controller.getElements()"
|
|
style="position: absolute;"
|
|
key="element.template"
|
|
parameters="{ gridSize: controller.getGridSize() }"
|
|
ng-class="{ test: 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="test"
|
|
style="position: absolute;"
|
|
mct-drag-down="controller.startDrag(controller.selected())"
|
|
mct-drag="controller.continueDrag(delta)"
|
|
mct-drag-up="controller.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> |