aboutsummaryrefslogtreecommitdiff
path: root/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-09 14:35:44 -0700
committerValerio Virgillito2012-07-09 14:35:44 -0700
commit84b3327bd92faafab7954b5eb64c7abe24a3fe13 (patch)
tree3f56cbed2f08c5a81ea79eaf0bcb9bd031d8a627 /js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js
parentc0a42c56f768a873ba637f5b86d5f6a84d4a3312 (diff)
parent40c6eb2c06b34f65a74d59ef9687251952858bab (diff)
downloadninja-84b3327bd92faafab7954b5eb64c7abe24a3fe13.tar.gz
Merge branch 'normalize' of https://github.com/kriskowal/ninja-internal
Conflicts: js/components/gradientpicker.reel/gradientpicker.js js/components/tools-properties/text-properties.reel/text-properties.js js/document/views/base.js js/document/views/design.js js/helper-classes/3D/StageLine.js js/helper-classes/3D/draw-utils.js js/lib/drawing/world.js js/lib/geom/circle.js js/lib/geom/line.js js/lib/geom/rectangle.js js/lib/geom/shape-primitive.js js/lib/rdge/materials/bump-metal-material.js js/lib/rdge/materials/flag-material.js js/lib/rdge/materials/fly-material.js js/lib/rdge/materials/julia-material.js js/lib/rdge/materials/keleidoscope-material.js js/lib/rdge/materials/mandel-material.js js/lib/rdge/materials/material.js js/lib/rdge/materials/plasma-material.js js/lib/rdge/materials/pulse-material.js js/lib/rdge/materials/radial-gradient-material.js js/lib/rdge/materials/taper-material.js js/lib/rdge/materials/twist-vert-material.js js/lib/rdge/materials/water-material.js js/panels/Materials/materials-library-panel.reel/materials-library-panel.html js/panels/Materials/materials-library-panel.reel/materials-library-panel.js js/panels/Materials/materials-popup.reel/materials-popup.html js/panels/Materials/materials-popup.reel/materials-popup.js js/tools/LineTool.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js')
-rwxr-xr-xjs/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js
index e214a49b..a6a655d5 100755
--- a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js
+++ b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js
@@ -49,25 +49,25 @@ exports.ComputedStyleSubPanel = Montage.create(Component, {
49 }, 49 },
50 // prepareForDraw : { 50 // prepareForDraw : {
51 // value: function() { 51 // value: function() {
52 // 52 //
53 // } 53 // }
54 // }, 54 // },
55 willDraw : { 55 willDraw : {
56 value: function() { 56 value: function() {
57 if(this._declaration) { 57 if(this._declaration) {
58 58
59 var group = this.staticGroupingMap[this._group], 59 var group = this.staticGroupingMap[this._group],
60 matchedInGroup, elementList; 60 matchedInGroup, elementList;
61 61
62 if(this._group === 'all' && !group) { 62 if(this._group === 'all' && !group) {
63 group = this.staticGroupingMap['all'] = nj.toArray(this._declaration).sort(); 63 group = this.staticGroupingMap['all'] = nj.toArray(this._declaration).sort();
64 } 64 }
65 65
66 ///// Filter group to show only the styles that match search filter 66 ///// Filter group to show only the styles that match search filter
67 matchedInGroup = group.filter(function(item) { 67 matchedInGroup = group.filter(function(item) {
68 return (item.indexOf(this._filter) > -1); 68 return (item.indexOf(this._filter) > -1);
69 }, this); 69 }, this);
70 70
71 this._elementList = matchedInGroup.map(function(propName) { 71 this._elementList = matchedInGroup.map(function(propName) {
72 var propEl = nj.make('dt'), 72 var propEl = nj.make('dt'),
73 valEl = nj.make('dd'), 73 valEl = nj.make('dd'),
@@ -75,20 +75,20 @@ exports.ComputedStyleSubPanel = Montage.create(Component, {
75 75
76 propEl.appendChild(nj.textNode(propName)); 76 propEl.appendChild(nj.textNode(propName));
77 propEl.title = propName; 77 propEl.title = propName;
78 78
79 valEl.appendChild(nj.textNode(this._declaration.getPropertyValue(propName))); 79 valEl.appendChild(nj.textNode(this._declaration.getPropertyValue(propName)));
80 valEl.title = this._declaration.getPropertyValue(propName); 80 valEl.title = this._declaration.getPropertyValue(propName);
81 81
82 contEl.appendChild(propEl); 82 contEl.appendChild(propEl);
83 contEl.appendChild(valEl); 83 contEl.appendChild(valEl);
84 84
85 return contEl; 85 return contEl;
86 }, this); 86 }, this);
87 87
88 /*if(matchedInGroup.length) { 88 /*if(matchedInGroup.length) {
89 89
90 } else { 90 } else {
91 91
92 }*/ 92 }*/
93 } 93 }
94 } 94 }
@@ -101,7 +101,7 @@ exports.ComputedStyleSubPanel = Montage.create(Component, {
101 ///// Append style elements to the list container 101 ///// Append style elements to the list container
102 this._elementList.forEach(function(el) { 102 this._elementList.forEach(function(el) {
103 this.computedListEl.appendChild(el); 103 this.computedListEl.appendChild(el);
104 }, this); 104 }, this);
105 } 105 }
106 } 106 }
107 }, 107 },
@@ -138,7 +138,7 @@ exports.ComputedStyleSubPanel = Montage.create(Component, {
138 ///// Get computed style of passed in node 138 ///// Get computed style of passed in node
139 declaration = this._declaration = source.ownerDocument.defaultView.getComputedStyle(source); 139 declaration = this._declaration = source.ownerDocument.defaultView.getComputedStyle(source);
140 } 140 }
141 141
142 this.needsDraw = true; 142 this.needsDraw = true;
143 } 143 }
144 }, 144 },
@@ -194,7 +194,7 @@ exports.ComputedStyleSubPanel = Montage.create(Component, {
194 'dimensions' : [ 194 'dimensions' : [
195 'width', 'height', 'top', 'right', 'bottom', 'left', 195 'width', 'height', 'top', 'right', 'bottom', 'left',
196 'padding-top', 'padding-right', 'padding-bottom', 'padding-left', 196 'padding-top', 'padding-right', 'padding-bottom', 'padding-left',
197 'margin-top', 'margin-right', 'margin-bottom', 'margin-left', 197 'margin-top', 'margin-right', 'margin-bottom', 'margin-left',
198 'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width' 198 'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width'
199 ], 199 ],
200 'border' : [ 200 'border' : [
@@ -203,7 +203,7 @@ exports.ComputedStyleSubPanel = Montage.create(Component, {
203 'border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style' 203 'border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style'
204 ], 204 ],
205 'font' : [ 205 'font' : [
206 'font-family', 'font-size', 'font-weight', 'font-style', 'color', 'text-transform', 206 'font-family', 'font-size', 'font-weight', 'font-style', 'color', 'text-transform',
207 'text-decoration', 'letter-spacing', 'word-spacing', 'line-height', 'text-align', 207 'text-decoration', 'letter-spacing', 'word-spacing', 'line-height', 'text-align',
208 'vertical-align', 'direction' 208 'vertical-align', 'direction'
209 ], 209 ],