diff options
author | Valerio Virgillito | 2012-02-23 01:52:34 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-23 01:52:34 -0800 |
commit | aaa8d05cc3cfd94322d356e265b94b0abb9f6305 (patch) | |
tree | 08cec1e25449d68c9a878d316965f216f33a8fae /js | |
parent | 31d73bccdda6145c6bbb5c25f6db3e139fcb9e6c (diff) | |
download | ninja-aaa8d05cc3cfd94322d356e265b94b0abb9f6305.tar.gz |
renaming makeElementModel2 to makeModelFromElement
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-x | js/document/html-document.js | 2 | ||||
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 4 | ||||
-rwxr-xr-x | js/lib/NJUtils.js | 4 | ||||
-rwxr-xr-x | js/mediators/element-mediator.js | 12 |
4 files changed, 11 insertions, 11 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js index b13dcc1e..ad0a7eb2 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js | |||
@@ -404,7 +404,7 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
404 | var len = this._liveNodeList.length; | 404 | var len = this._liveNodeList.length; |
405 | 405 | ||
406 | for(var i = 0; i < len; i++) { | 406 | for(var i = 0; i < len; i++) { |
407 | NJUtils.makeElementModel2(this._liveNodeList[i]); | 407 | NJUtils.makeModelFromElement(this._liveNodeList[i]); |
408 | } | 408 | } |
409 | 409 | ||
410 | /* this.iframe.contentWindow.document.addEventListener('DOMSubtreeModified', function (e) { */ //TODO: Remove events upon loading once | 410 | /* this.iframe.contentWindow.document.addEventListener('DOMSubtreeModified', function (e) { */ //TODO: Remove events upon loading once |
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index 0a950658..2922edf9 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js | |||
@@ -521,7 +521,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
521 | 521 | ||
522 | if (!elt.elementModel) | 522 | if (!elt.elementModel) |
523 | { | 523 | { |
524 | NJUtils.makeElementModel2(elt); | 524 | NJUtils.makeModelFromElement(elt); |
525 | } | 525 | } |
526 | elt.elementModel.isIn2DSnapCache = true; | 526 | elt.elementModel.isIn2DSnapCache = true; |
527 | } | 527 | } |
@@ -588,7 +588,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
588 | 588 | ||
589 | if (!elt.elementModel) | 589 | if (!elt.elementModel) |
590 | { | 590 | { |
591 | NJUtils.makeElementModel2(elt); | 591 | NJUtils.makeModelFromElement(elt); |
592 | } | 592 | } |
593 | elt.elementModel.isIn2DSnapCache = true; | 593 | elt.elementModel.isIn2DSnapCache = true; |
594 | } | 594 | } |
diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index 887743c5..e16715a4 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js | |||
@@ -113,8 +113,8 @@ exports.NJUtils = Object.create(Object.prototype, { | |||
113 | }, | 113 | }, |
114 | 114 | ||
115 | ///// Element Model creation for existing elements based on element type. | 115 | ///// Element Model creation for existing elements based on element type. |
116 | ///// TODO: find a different place for this function and return different element models based on type. | 116 | ///// TODO: Selection and model should be based on the element type |
117 | makeElementModel2: { | 117 | makeModelFromElement: { |
118 | value: function(el) { | 118 | value: function(el) { |
119 | this.makeElementModel(el, "Div", "block", false); | 119 | this.makeElementModel(el, "Div", "block", false); |
120 | } | 120 | } |
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 51923f08..127f73e1 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -463,7 +463,7 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
463 | getColor: { | 463 | getColor: { |
464 | value: function(el, isFill) { | 464 | value: function(el, isFill) { |
465 | if(!el.elementModel) { | 465 | if(!el.elementModel) { |
466 | NJUtils.makeElementModel2(el); | 466 | NJUtils.makeModelFromElement(el); |
467 | } | 467 | } |
468 | return el.elementModel.controller["getColor"](el, isFill); | 468 | return el.elementModel.controller["getColor"](el, isFill); |
469 | } | 469 | } |
@@ -624,7 +624,7 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
624 | getColor2: { | 624 | getColor2: { |
625 | value: function(el, prop, mutator) { | 625 | value: function(el, prop, mutator) { |
626 | if(!el.elementModel) { | 626 | if(!el.elementModel) { |
627 | NJUtils.makeElementModel2(el); | 627 | NJUtils.makeModelFromElement(el); |
628 | } | 628 | } |
629 | 629 | ||
630 | return this.getColor(el, (prop === "background")); | 630 | return this.getColor(el, (prop === "background")); |
@@ -636,7 +636,7 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
636 | get3DProperty: { | 636 | get3DProperty: { |
637 | value: function(el, prop) { | 637 | value: function(el, prop) { |
638 | if(!el.elementModel) { | 638 | if(!el.elementModel) { |
639 | NJUtils.makeElementModel2(el); | 639 | NJUtils.makeModelFromElement(el); |
640 | } | 640 | } |
641 | return el.elementModel.controller["get3DProperty"](el, prop); | 641 | return el.elementModel.controller["get3DProperty"](el, prop); |
642 | } | 642 | } |
@@ -645,7 +645,7 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
645 | get3DProperties: { | 645 | get3DProperties: { |
646 | value: function(el) { | 646 | value: function(el) { |
647 | if(!el.elementModel) { | 647 | if(!el.elementModel) { |
648 | NJUtils.makeElementModel2(el); | 648 | NJUtils.makeModelFromElement(el); |
649 | } | 649 | } |
650 | // var mat = this.getMatrix(el); | 650 | // var mat = this.getMatrix(el); |
651 | // var dist = this.getPerspectiveDist(el); | 651 | // var dist = this.getPerspectiveDist(el); |
@@ -658,7 +658,7 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
658 | getMatrix: { | 658 | getMatrix: { |
659 | value: function(el) { | 659 | value: function(el) { |
660 | if(!el.elementModel) { | 660 | if(!el.elementModel) { |
661 | NJUtils.makeElementModel2(el); | 661 | NJUtils.makeModelFromElement(el); |
662 | } | 662 | } |
663 | return el.elementModel.controller["getMatrix"](el); | 663 | return el.elementModel.controller["getMatrix"](el); |
664 | } | 664 | } |
@@ -667,7 +667,7 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
667 | getPerspectiveDist: { | 667 | getPerspectiveDist: { |
668 | value: function(el) { | 668 | value: function(el) { |
669 | if(!el.elementModel) { | 669 | if(!el.elementModel) { |
670 | NJUtils.makeElementModel2(el); | 670 | NJUtils.makeModelFromElement(el); |
671 | } | 671 | } |
672 | return el.elementModel.controller["getPerspectiveDist"](el); | 672 | return el.elementModel.controller["getPerspectiveDist"](el); |
673 | } | 673 | } |