diff options
Diffstat (limited to 'js/panels/Materials/materials-library-panel.reel/materials-library-panel.js')
-rwxr-xr-x | js/panels/Materials/materials-library-panel.reel/materials-library-panel.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js index 2176c6d5..205ecd90 100755 --- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js | |||
@@ -51,14 +51,15 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { | |||
51 | 51 | ||
52 | handleNodeActivation: { | 52 | handleNodeActivation: { |
53 | value:function(obj) { | 53 | value:function(obj) { |
54 | this._showMaterialPopup(obj.id); | 54 | this._showMaterialPopup({ materialId: obj.id }); |
55 | } | 55 | } |
56 | }, | 56 | }, |
57 | 57 | ||
58 | handleShowMaterialPopup: { | 58 | handleShowMaterialPopup: { |
59 | enumerable: false, | 59 | enumerable: false, |
60 | value: function (event) { | 60 | value: function (event) { |
61 | this._showMaterialPopup(event.detail.materialId); | 61 | //this._showMaterialPopup(event.detail.materialId); |
62 | this._showMaterialPopup(event.detail); | ||
62 | } | 63 | } |
63 | }, | 64 | }, |
64 | 65 | ||
@@ -73,9 +74,9 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { | |||
73 | 74 | ||
74 | _showMaterialPopup: { | 75 | _showMaterialPopup: { |
75 | enumerable: false, | 76 | enumerable: false, |
76 | value: function (materialID) { | 77 | value: function (materialObj) { |
77 | 78 | ||
78 | if(!this._materialPopup) | 79 | if(!this._materialPopup) |
79 | { | 80 | { |
80 | this._materialPopup = Popup.create(); | 81 | this._materialPopup = Popup.create(); |
81 | this._materialPopup.content = this._materialInfo; | 82 | this._materialPopup.content = this._materialInfo; |
@@ -84,7 +85,9 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { | |||
84 | this._materialPopup.addEventListener("show", this, false); | 85 | this._materialPopup.addEventListener("show", this, false); |
85 | } | 86 | } |
86 | this._materialPopup.show(); | 87 | this._materialPopup.show(); |
87 | this._materialInfo.loadMaterials(materialID); | 88 | |
89 | materialID = materialObj.materialId; | ||
90 | this._materialInfo.loadMaterials(materialID, materialObj.useSelection, materialObj.whichMaterial); | ||
88 | } | 91 | } |
89 | }, | 92 | }, |
90 | 93 | ||