diff options
author | Valerio Virgillito | 2012-04-26 13:24:51 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-04-26 13:24:51 -0700 |
commit | 1ccc4d6dcff232b00763a5a49d7ad7a91f78ad3f (patch) | |
tree | 3d1f74c243cb2d12325ffba3960a63ff627e7e2c /js/models | |
parent | d0893407d35f4e05bbe2fd41c2b70151984fe481 (diff) | |
download | ninja-1ccc4d6dcff232b00763a5a49d7ad7a91f78ad3f.tar.gz |
Fixing the element model and adding get element
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/models')
-rwxr-xr-x | js/models/element-model.js | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/js/models/element-model.js b/js/models/element-model.js index fa02fd38..0e199a67 100755 --- a/js/models/element-model.js +++ b/js/models/element-model.js | |||
@@ -4,7 +4,10 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage; | 7 | var Montage = require("montage/core/core").Montage, |
8 | Properties3D = require("js/models/properties-3d").Properties3D, | ||
9 | ShapeModel = require("js/models/shape-model").ShapeModel, | ||
10 | ControllerFactory = require("js/controllers/elements/controller-factory").ControllerFactory; | ||
8 | 11 | ||
9 | exports.ElementModel = Montage.create(Montage, { | 12 | exports.ElementModel = Montage.create(Montage, { |
10 | key: { value: "_model_"}, | 13 | key: { value: "_model_"}, |
@@ -16,36 +19,36 @@ exports.ElementModel = Montage.create(Montage, { | |||
16 | 19 | ||
17 | id: { value: "" }, | 20 | id: { value: "" }, |
18 | classList: { value: null }, | 21 | classList: { value: null }, |
19 | |||
20 | defaultRule: { value: null }, | 22 | defaultRule: { value: null }, |
21 | 23 | ||
22 | top: { value: null }, | 24 | top: { value: null }, |
23 | left: { value: null }, | 25 | left: { value: null }, |
24 | width: { value: null }, | 26 | width: { value: null }, |
25 | height: { value: null }, | 27 | height: { value: null }, |
26 | |||
27 | /** | ||
28 | * Properties 3D | ||
29 | */ | ||
30 | props3D: { value: null }, | 28 | props3D: { value: null }, |
31 | 29 | ||
32 | /** | ||
33 | * Shape Info | ||
34 | */ | ||
35 | isShape: { value: false }, | 30 | isShape: { value: false }, |
36 | shapeModel: { value: null }, | 31 | shapeModel: { value: null }, |
37 | |||
38 | /** | ||
39 | * SnapManager 2d Snap Cache Info | ||
40 | */ | ||
41 | isIn2DSnapCache : { value: false }, | 32 | isIn2DSnapCache : { value: false }, |
42 | 33 | ||
43 | /** | ||
44 | * Color info | ||
45 | */ | ||
46 | fill: { value: null }, | 34 | fill: { value: null }, |
47 | stroke: { value: null }, | 35 | stroke: { value: null }, |
48 | 36 | ||
37 | initialize: { | ||
38 | value: function(type, selection, controller, isShape) { | ||
39 | /* | ||
40 | this.type = type; | ||
41 | this.selection = selection; | ||
42 | |||
43 | controller: { value: ControllerFactory.getController(controller)}, | ||
44 | pi: { value: pi}, | ||
45 | props3D: { value: p3d}, | ||
46 | shapeModel: { value: shapeProps}, | ||
47 | isShape: { value: isShape} | ||
48 | */ | ||
49 | } | ||
50 | }, | ||
51 | |||
49 | getProperty: { | 52 | getProperty: { |
50 | value: function(property) { | 53 | value: function(property) { |
51 | var key = this.key + property; | 54 | var key = this.key + property; |