diff options
author | Valerio Virgillito | 2012-06-07 10:51:26 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-07 10:51:26 -0700 |
commit | b75fe9369f7caec0351d298f7106c8d59572b440 (patch) | |
tree | 8f2f2db6097104e44c8d87e11466d1f3124c7f3a /js/document/templates/html | |
parent | 47e0e1f047e83b71c3f86812a45d33904201cc7a (diff) | |
parent | 6442dcc0cc4088d28558a9c121c6a91cba3ff078 (diff) | |
download | ninja-b75fe9369f7caec0351d298f7106c8d59572b440.tar.gz |
Merge pull request #275 from mencio/element-model-fixes
Element model fixes and selection fixes
Diffstat (limited to 'js/document/templates/html')
-rwxr-xr-x | js/document/templates/html/index.html | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/js/document/templates/html/index.html b/js/document/templates/html/index.html index 70187900..c74a7251 100755 --- a/js/document/templates/html/index.html +++ b/js/document/templates/html/index.html | |||
@@ -57,13 +57,32 @@ | |||
57 | 57 | ||
58 | .nj-element-highlight { | 58 | .nj-element-highlight { |
59 | outline: 4px solid #ff0000; | 59 | outline: 4px solid #ff0000; |
60 | } | 60 | } |
61 | </style> | 61 | </style> |
62 | 62 | ||
63 | <script type="text/javascript" data-ninja-template="true"> | 63 | <script type="text/javascript" data-ninja-template="true"> |
64 | function getElement(x,y) { | 64 | |
65 | return document.elementFromPoint(x,y); | 65 | function getElement(x,y) { |
66 | } | 66 | return document.elementFromPoint(x,y); |
67 | } | ||
68 | |||
69 | var njmodelGet = function njmodelGet() { | ||
70 | return (this.hasOwnProperty("_model") ? this._model: document.modelGenerator.call(this)); | ||
71 | }; | ||
72 | |||
73 | Object.defineProperty(Object.prototype, "_model", { | ||
74 | enumerable: false, | ||
75 | value: null, | ||
76 | writable: true | ||
77 | }); | ||
78 | |||
79 | Object.defineProperty(Object.prototype, "elementModel", { | ||
80 | configurable: true, | ||
81 | get: njmodelGet, | ||
82 | set: function() { | ||
83 | } | ||
84 | }); | ||
85 | |||
67 | </script> | 86 | </script> |
68 | 87 | ||
69 | <script type="text/javascript" data-package="../app" src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script> | 88 | <script type="text/javascript" data-package="../app" src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script> |