From 6fb6761abf6cc1092df6308a23f2b20b46f16dbe Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 27 Jan 2016 13:52:31 -0800 Subject: [PATCH] [Plots] #638 New plot display options --- main.js | 1 + platform/commonUI/browse/bundle.js | 17 +++- .../templates/browse/inspector-region.html | 30 ++++++ .../templates/browse/object-properties.html | 61 ++++++++++++ .../commonUI/browse/src/InspectorRegion.js | 69 ++++++++++++++ .../browse/src/TypeRegionDecorator.js | 89 ++++++++++++++++++ .../res/templates/object-inspector.html | 47 ++-------- platform/commonUI/regions/bundle.js | 55 +++++++++++ .../regions/src/EditableRegionPolicy.js | 57 +++++++++++ platform/commonUI/regions/src/Region.js | 94 +++++++++++++++++++ .../commonUI/regions/src/RegionController.js | 64 +++++++++++++ .../regions/test/InspectorRegionSpec.js | 45 +++++++++ platform/commonUI/regions/test/suite.json | 3 + platform/features/layout/bundle.js | 48 +++++++++- .../res/templates/plot-options-browse.html | 57 +++++++++++ .../layout/src/PlotOptionsController.js | 87 +++++++++++++++++ 16 files changed, 782 insertions(+), 42 deletions(-) create mode 100644 platform/commonUI/browse/res/templates/browse/inspector-region.html create mode 100644 platform/commonUI/browse/res/templates/browse/object-properties.html create mode 100644 platform/commonUI/browse/src/InspectorRegion.js create mode 100644 platform/commonUI/browse/src/TypeRegionDecorator.js create mode 100644 platform/commonUI/regions/bundle.js create mode 100644 platform/commonUI/regions/src/EditableRegionPolicy.js create mode 100644 platform/commonUI/regions/src/Region.js create mode 100644 platform/commonUI/regions/src/RegionController.js create mode 100644 platform/commonUI/regions/test/InspectorRegionSpec.js create mode 100644 platform/commonUI/regions/test/suite.json create mode 100644 platform/features/layout/res/templates/plot-options-browse.html create mode 100644 platform/features/layout/src/PlotOptionsController.js diff --git a/main.js b/main.js index fd5f4533fb..9964c90a6d 100644 --- a/main.js +++ b/main.js @@ -71,6 +71,7 @@ define([ './platform/entanglement/bundle', './platform/search/bundle', './platform/status/bundle', + './platform/commonUI/regions/bundle', './example/imagery/bundle', './example/eventGenerator/bundle', diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js index 21aba14b91..bc62a1a36e 100644 --- a/platform/commonUI/browse/bundle.js +++ b/platform/commonUI/browse/bundle.js @@ -36,6 +36,7 @@ define([ "./src/creation/CreateActionProvider", "./src/creation/CreationService", "./src/windowing/WindowTitler", + "./src/TypeRegionDecorator", 'legacyRegistry' ], function ( BrowseController, @@ -52,6 +53,7 @@ define([ CreateActionProvider, CreationService, WindowTitler, + TypeRegionDecorator, legacyRegistry ) { "use strict"; @@ -192,6 +194,14 @@ define([ "context" ], "templateUrl": "templates/back-arrow.html" + }, + { + "key": "object-properties", + "templateUrl": "templates/browse/object-properties.html" + }, + { + "key": "inspector-region", + "templateUrl": "templates/browse/inspector-region.html" } ], "services": [ @@ -280,7 +290,12 @@ define([ "$q", "$log" ] - } + }, + { + "provides": "typeService", + "type": "decorator", + "implementation": TypeRegionDecorator + }, ], "runs": [ { diff --git a/platform/commonUI/browse/res/templates/browse/inspector-region.html b/platform/commonUI/browse/res/templates/browse/inspector-region.html new file mode 100644 index 0000000000..b946c06ab3 --- /dev/null +++ b/platform/commonUI/browse/res/templates/browse/inspector-region.html @@ -0,0 +1,30 @@ + +
+
+ + +
+
diff --git a/platform/commonUI/browse/res/templates/browse/object-properties.html b/platform/commonUI/browse/res/templates/browse/object-properties.html new file mode 100644 index 0000000000..149da6b874 --- /dev/null +++ b/platform/commonUI/browse/res/templates/browse/object-properties.html @@ -0,0 +1,61 @@ + +
+
Inspection
+ +
\ No newline at end of file diff --git a/platform/commonUI/browse/src/InspectorRegion.js b/platform/commonUI/browse/src/InspectorRegion.js new file mode 100644 index 0000000000..72b71a1e01 --- /dev/null +++ b/platform/commonUI/browse/src/InspectorRegion.js @@ -0,0 +1,69 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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. + *****************************************************************************/ +/*global define,window*/ + +define( + [ + '../../regions/src/Region' + ], + function (Region) { + "use strict"; + + /** + * Defines the a default Inspector region. Captured in a class to + * allow for modular extension and customization of regions based on + * the typical case. + * @memberOf platform/commonUI/regions + * @constructor + */ + function InspectorRegion() { + Region.call(this); + + this.buildRegion(); + } + + InspectorRegion.prototype = Object.create(Region.prototype); + InspectorRegion.prototype.constructor = Region; + + /** + * @private + */ + InspectorRegion.prototype.buildRegion = function() { + var metadataPart = { + name: 'properties-location', + title: 'Properties and Location', + // Which modes should the region part be visible in? If + // nothing provided here, then assumed that part is visible + // in both. The visibility or otherwise of a region part + // should be decided by a policy. In this case, 'modes' is a + // shortcut that is used by the EditableRegionPolicy. + modes: ['browse', 'edit'], + content: { + key: 'object-properties' + } + }; + this.addPart(metadataPart, 0); + } + + return InspectorRegion; + } +); diff --git a/platform/commonUI/browse/src/TypeRegionDecorator.js b/platform/commonUI/browse/src/TypeRegionDecorator.js new file mode 100644 index 0000000000..60e75cac24 --- /dev/null +++ b/platform/commonUI/browse/src/TypeRegionDecorator.js @@ -0,0 +1,89 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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. + *****************************************************************************/ +/*global define,window*/ + +define( + [ + './InspectorRegion' + ], + function (InspectorRegion) { + "use strict"; + + /** + * Adds default screen regions to Type definitions. Screen regions + * are sections of the browse and edit view of an object that can be + * customized on a per-type basis. Within {@link Region}s are {@link RegionPart}s. + * Policies can be used to decide which parts are visible or not based on object state. + * @memberOf platform/commonUI/regions + * @see {@link Region}, {@link RegionPart}, {@link EditableRegionPolicy} + * @constructor + */ + function TypeRegionDecorator(typeService) { + this.typeService = typeService + } + + /** + * Read Type bundle definition, and add default region definitions + * if none provided. + * @private + * @param type + * @returns {*} + */ + TypeRegionDecorator.prototype.decorateType = function (type) { + var regions = type.getDefinition().regions || {}; + + regions.inspector = regions.inspector || new InspectorRegion(); + + type.getDefinition().regions = regions; + + return type; + }; + + /** + * Override the provider functions in order to return decorated Type + * objects. + * @returns {Array|*} + */ + TypeRegionDecorator.prototype.listTypes = function() { + var self = this, + types = this.typeService.listTypes(); + + return types.map(function (type) { + return self.decorateType(type); + }); + }; + + /** + * Override the provider function in order to return decorated Type + * objects. + * @param key + */ + TypeRegionDecorator.prototype.getType = function(key) { + var self = this, + type = this.typeService.getType(key); + + return self.decorateType(type); + }; + + return TypeRegionDecorator; + } +); diff --git a/platform/commonUI/general/res/templates/object-inspector.html b/platform/commonUI/general/res/templates/object-inspector.html index 5f3e4d522e..8b13d841c5 100644 --- a/platform/commonUI/general/res/templates/object-inspector.html +++ b/platform/commonUI/general/res/templates/object-inspector.html @@ -19,49 +19,16 @@ this source code distribution or the Licensing information page available at runtime from the About dialog for additional information. --> - +
-
+
-
Inspection
-
    -
  • - Properties -
    -
    {{ data.name }}
    -
    {{ data.value }}
    -
    -
  • -
  • - Location - - - - -
  • -
  • - Original Location - - - - -
  • -
+ +
diff --git a/platform/commonUI/regions/bundle.js b/platform/commonUI/regions/bundle.js new file mode 100644 index 0000000000..dce4543b60 --- /dev/null +++ b/platform/commonUI/regions/bundle.js @@ -0,0 +1,55 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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. + *****************************************************************************/ +/*global define*/ + +define([ + './src/RegionController', + './src/EditableRegionPolicy', + 'legacyRegistry' +], function ( + RegionController, + EditableRegionPolicy, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/regions", { + "extensions": { + "controllers": [ + { + "key": "RegionController", + "implementation": RegionController, + "depends": [ + "$scope", + "policyService" + ] + } + ], + "policies": [ + { + "category": "region", + "implementation": EditableRegionPolicy + } + ] + } + }); +}); diff --git a/platform/commonUI/regions/src/EditableRegionPolicy.js b/platform/commonUI/regions/src/EditableRegionPolicy.js new file mode 100644 index 0000000000..94825ff550 --- /dev/null +++ b/platform/commonUI/regions/src/EditableRegionPolicy.js @@ -0,0 +1,57 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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. + *****************************************************************************/ +/*global define*/ + +define( + [], + function () { + "use strict"; + + /** + * A policy for determining whether a region part should be visible or + * not, based on its editability and the current state of the domain + * object . + * @constructor + * @implements {Policy} + * @memberof platform/commonUI/regions + */ + function EditableRegionPolicy() { + } + + EditableRegionPolicy.prototype.allow = function (regionPart, domainObject) { + if (!regionPart.modes){ + return true; + } + if (domainObject.getCapability('status').get('editing')){ + //If the domain object is in edit mode, only include a part + // if it is marked editable + return regionPart.modes.indexOf('edit') != -1; + } else { + //If the domain object is not in edit mode, return any parts + // that are not explicitly marked editable + return regionPart.modes.indexOf('browse') != -1; + } + }; + + return EditableRegionPolicy; + } +); \ No newline at end of file diff --git a/platform/commonUI/regions/src/Region.js b/platform/commonUI/regions/src/Region.js new file mode 100644 index 0000000000..b39f53c55f --- /dev/null +++ b/platform/commonUI/regions/src/Region.js @@ -0,0 +1,94 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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. + *****************************************************************************/ +/*global define,window*/ + +define( + [], + function () { + "use strict"; + + /** + * @typeDef {object} PartContents + * @property {string} key If the part is defined as a + * representation, the key corresponding to the representation. + * @memberOf platform/commonUI/regions + */ + + /** + * @typeDef {object} RegionPart + * @property {string} name A unique name for this region part + * @property {PartContents} content the details of the region part + * being defined + * @property {Array} [modes] the modes that this region part + * should be included in. Options are 'edit' and 'browse'. By + * default, will be included in both. Inclusion of region parts is + * determined by policies of category 'region'. By default, the + * {EditableRegionPolicy} will be applied. + * @memberOf platform/commonUI/regions + */ + + /** + * Defines the interface for a screen region. A screen region is a + * section of the browse an edit screens for an object. Regions are + * declared in object type definitions. + * @memberOf platform/commonUI/regions + * @abstract + * @constructor + */ + function Region() { + this.parts = []; + } + + /** + * Adds a part to this region. + * @param {RegionPart} part the part to add + * @param {number} [index] the position to insert the part. By default + * will add to the end + */ + Region.prototype.addPart = function (part, index){ + if (index) { + this.parts.splice(index, 0, part); + } else { + this.parts.push(part); + } + }; + + /** + * Removes a part from this region. + * @param {RegionPart} part the part to add + * @param {number} [index] the position to insert the part. By default + * will add to the end + */ + Region.prototype.removePart = function (part){ + if (typeof part === 'number') { + this.parts.splice(part, 1); + } else if (typeof part === 'string'){ + this.parts + } + else { + this.parts.splice(this.parts.indexOf(part), 1); + } + }; + + return Region; + } +); diff --git a/platform/commonUI/regions/src/RegionController.js b/platform/commonUI/regions/src/RegionController.js new file mode 100644 index 0000000000..756eb1f5d7 --- /dev/null +++ b/platform/commonUI/regions/src/RegionController.js @@ -0,0 +1,64 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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. + *****************************************************************************/ +/*global define,Promise*/ + +define( + [], + function () { + "use strict"; + + /** + * The RegionController adds region data for a domain object's type + * to the scope. + * + * @constructor + */ + function RegionController($scope, policyService) { + var domainObject = $scope.domainObject, + typeCapability = domainObject.getCapability('type'); + + /** + * TODO: Refactor this out, probably to a directive. + * Or, alternatively, could have a regionCapability that returns + * regions and parts filtered for applicability to current + * object state. + * @param regions + * @returns {*} + */ + function filterParts(regions) { + //Dupe so we're not modifying the type definition. + var filteredRegions = {}; + for (var regionName in regions) { + filteredRegions[regionName] = Object.create(regions[regionName]); + filteredRegions[regionName].parts = regions[regionName].parts.filter(function(part){ + return policyService.allow('region', part, domainObject); + }); + } + return filteredRegions; + } + + $scope.regions = filterParts(typeCapability.getDefinition().regions); + } + + return RegionController; + } +); \ No newline at end of file diff --git a/platform/commonUI/regions/test/InspectorRegionSpec.js b/platform/commonUI/regions/test/InspectorRegionSpec.js new file mode 100644 index 0000000000..9192ba3f11 --- /dev/null +++ b/platform/commonUI/regions/test/InspectorRegionSpec.js @@ -0,0 +1,45 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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. + *****************************************************************************/ +/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ + +/** + * MCTIncudeSpec. Created by vwoeltje on 11/6/14. + */ +define( + ["../src/InspectorRegion"], + function (InspectorRegion) { + "use strict"; + + describe("The inspector region", function () { + var inspectorRegion; + + beforeEach(function () { + inspectorRegion = new InspectorRegion; + }); + + it("creates default region parts", function () { + expect(inspectorRegion.parts().length).toBe(2); + }); + + }); + } +); \ No newline at end of file diff --git a/platform/commonUI/regions/test/suite.json b/platform/commonUI/regions/test/suite.json new file mode 100644 index 0000000000..56239e1a2b --- /dev/null +++ b/platform/commonUI/regions/test/suite.json @@ -0,0 +1,3 @@ +[ + "InspectorRegion" +] \ No newline at end of file diff --git a/platform/features/layout/bundle.js b/platform/features/layout/bundle.js index 538d456007..4626275211 100644 --- a/platform/features/layout/bundle.js +++ b/platform/features/layout/bundle.js @@ -25,15 +25,45 @@ define([ "./src/LayoutController", "./src/FixedController", "./src/LayoutCompositionPolicy", + "../../commonUI/browse/src/InspectorRegion", + "./src/PlotOptionsController", 'legacyRegistry' ], function ( LayoutController, FixedController, LayoutCompositionPolicy, + InspectorRegion, + PlotOptionsController, legacyRegistry ) { "use strict"; + /** + * Customize and extend the default 'Inspector' region for the panel + * type, to add display options for plots. This should be moved to a + * dedicated type. + * @type {InspectorRegion} + */ + var plotInspector = new InspectorRegion(), + plotOptionsBrowsePart = { + name: "plot-options", + title: "Plot Options", + modes: ['browse'], + content: { + key: "plot-options-browse" + } + }, + plotOptionsEditPart = { + name: "plot-options", + title: "Plot Options", + modes: ['edit'], + content: { + key: "plot-options-browse" + } + }; + plotInspector.addPart(plotOptionsBrowsePart); + plotInspector.addPart(plotOptionsEditPart); + legacyRegistry.register("platform/features/layout", { "name": "Layout components.", "description": "Plug in adding Layout capabilities.", @@ -192,6 +222,10 @@ define([ { "key": "frame", "templateUrl": "templates/frame.html" + }, + { + "key": "plot-options-browse", + "templateUrl": "templates/plot-options-browse.html" } ], "controllers": [ @@ -213,6 +247,13 @@ define([ "telemetryFormatter", "throttle" ] + }, + { + "key": "PlotOptionsController", + "implementation": PlotOptionsController, + "depends": [ + "$scope" + ] } ], "templates": [ @@ -312,7 +353,12 @@ define([ "property": "layoutGrid", "conversion": "number[]" } - ] + ], + "regions": { + "inspector": plotInspector + } + + } ] } diff --git a/platform/features/layout/res/templates/plot-options-browse.html b/platform/features/layout/res/templates/plot-options-browse.html new file mode 100644 index 0000000000..693ad633e4 --- /dev/null +++ b/platform/features/layout/res/templates/plot-options-browse.html @@ -0,0 +1,57 @@ + +
+ Display +
    +
      +
    • + + + + + + + + + +
      + + +
      +
      +
    • +
    +
+
\ No newline at end of file diff --git a/platform/features/layout/src/PlotOptionsController.js b/platform/features/layout/src/PlotOptionsController.js new file mode 100644 index 0000000000..7f74492129 --- /dev/null +++ b/platform/features/layout/src/PlotOptionsController.js @@ -0,0 +1,87 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web 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 Web 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. + *****************************************************************************/ +/*global define*/ + +/** + * This bundle implements object types and associated views for + * display-building. + * @namespace platform/features/layout + */ +define( + [], + function () { + "use strict"; + + /** + * The LayoutController is responsible for supporting the + * Layout view. It arranges frames according to saved configuration + * and provides methods for updating these based on mouse + * movement. + * @memberof platform/features/layout + * @constructor + * @param {Scope} $scope the controller's Angular scope + */ + function PlotOptionsController($scope) { + var self = this, + plotOptionsStructure = { + 'name':'Plot Options', + 'sections': [{ + 'rows':[ + { + 'name': 'Markers', + 'control': 'checkbox', + 'key': 'markers' + }, + { + 'name': 'No Line', + 'control': 'checkbox', + 'key': 'noLine' + }, + { + 'name': 'Step Line', + 'control': 'checkbox', + 'key': 'stepLine' + }, + { + 'name': 'Linear Line', + 'control': 'checkbox', + 'key': 'linearLine' + } + ] + }]}, + plotOptionsModel = {}; + + $scope.plotOptionsStructure = plotOptionsStructure; + $scope.plotOptionsModel = plotOptionsModel; + + $scope.domainObject.useCapability('composition').then(function(children){ + $scope.children = children; + }); + + + + } + + return PlotOptionsController; + } +); +