mirror of
https://github.com/nasa/openmct.git
synced 2025-05-02 00:39:58 +00:00
* Initial attempt at getting the toolbar for the fixed position working with the Vue toolbar controls. * Set title for controls * Significant mods to support legacy Fixed Position - Moved selection and editing styles into _global.scss; - Changed class naming in legacy fixed.html to map to newer CSS styles; * Pass in the color value * Do not show the toolbar container if structure is empty. * Use a plugin for fixed position to get access to openmct. Show the toolbar only if the object is being edited. * Ensure fixedController is on the selection context when editing * Add listener for a domain object with the same id only once. Update the toolbar value after the object mutation. Remove editor isEditing listener on destroyed. * Remove space between the size and px. If newObject exists, update the toolbar value. * Remove --nwse class name which seems to be a typo * use modifier convention
63 lines
2.9 KiB
HTML
63 lines
2.9 KiB
HTML
<!--
|
|
Open MCT, Copyright (c) 2014-2018, United States Government
|
|
as represented by the Administrator of the National Aeronautics and Space
|
|
Administration. All rights reserved.
|
|
|
|
Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
http://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
License for the specific language governing permissions and limitations
|
|
under the License.
|
|
|
|
Open MCT includes source code licensed under additional open source
|
|
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
this source code distribution or the Licensing information page available
|
|
at runtime from the About dialog for additional information.
|
|
-->
|
|
<div class="t-fixed-position l-fixed-position"
|
|
ng-controller="FixedController as controller">
|
|
|
|
<!-- Background grid -->
|
|
<div class="l-fixed-position__grid-holder l-grid-holder c-grid" ng-click="controller.bypassSelection($event)">
|
|
<div class="c-grid__x l-grid l-grid-x"
|
|
ng-if="!controller.getGridSize()[0] < 3"
|
|
ng-style="{ 'background-size': controller.getGridSize() [0] + 'px 100%' }"></div>
|
|
<div class="c-grid__y l-grid l-grid-y"
|
|
ng-if="!controller.getGridSize()[1] < 3"
|
|
ng-style="{ 'background-size': '100% ' + controller.getGridSize() [1] + 'px' }"></div>
|
|
</div>
|
|
|
|
<!-- Fixed position elements -->
|
|
<div ng-repeat="element in controller.getElements()"
|
|
class="l-fixed-position-item s-selectable s-moveable is-selectable is-moveable"
|
|
ng-style="element.style"
|
|
mct-selectable="controller.getContext(element)"
|
|
mct-init-select="controller.shouldSelect(element)">
|
|
<mct-include key="element.template"
|
|
parameters="{ gridSize: controller.getGridSize() }"
|
|
ng-model="element">
|
|
</mct-include>
|
|
</div>
|
|
<!-- Selection highlight, handles -->
|
|
<span class="c-frame-edit" ng-if="controller.isElementSelected()">
|
|
<div class="c-frame-edit__move"
|
|
mct-drag-down="controller.moveHandle().startDrag()"
|
|
mct-drag="controller.moveHandle().continueDrag(delta)"
|
|
mct-drag-up="controller.endDrag()"
|
|
ng-style="controller.getSelectedElementStyle()">
|
|
</div>
|
|
<div ng-repeat="handle in controller.handles()"
|
|
class="c-frame-edit__handle c-frame-edit__handle--nwse"
|
|
ng-style="handle.style()"
|
|
mct-drag-down="handle.startDrag()"
|
|
mct-drag="handle.continueDrag(delta)"
|
|
mct-drag-up="controller.endDrag(handle)">
|
|
</div>
|
|
</span>
|
|
</div>
|