aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-15 16:10:01 -0700
committerValerio Virgillito2012-05-15 16:10:01 -0700
commit46bd3712329cd3c9311e50ed9ee4c2245bd1be5a (patch)
treef32e8b27851f71a82ca53b06802bbe10f4530583
parent1c91748d8517656c0982c6fc194cd0010d02fb63 (diff)
parent94855a2c1074f67f158b94ca0d61c51ee46c51b5 (diff)
downloadninja-46bd3712329cd3c9311e50ed9ee4c2245bd1be5a.tar.gz
Merge pull request #235 from mencio/dom-architecture
Dom architecture - code cleanup and fixed mouse wheel scroll
-rwxr-xr-xjs/panels/properties.reel/properties.html10
-rwxr-xr-xjs/panels/properties.reel/sections/position-size.reel/position-size.css (renamed from js/panels/properties.reel/sections/position-and-size.reel/position-and-size.css)0
-rwxr-xr-xjs/panels/properties.reel/sections/position-size.reel/position-size.html (renamed from js/panels/properties.reel/sections/position-and-size.reel/position-and-size.html)6
-rwxr-xr-xjs/panels/properties.reel/sections/position-size.reel/position-size.js (renamed from js/panels/properties.reel/sections/position-and-size.reel/position-and-size.js)2
-rwxr-xr-xjs/stage/stage.reel/stage.js4
5 files changed, 13 insertions, 9 deletions
diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html
index 3a1ae880..ac0dab5a 100755
--- a/js/panels/properties.reel/properties.html
+++ b/js/panels/properties.reel/properties.html
@@ -38,13 +38,15 @@
38 "prototype": "js/panels/properties.reel/section.reel", 38 "prototype": "js/panels/properties.reel/section.reel",
39 "properties": { 39 "properties": {
40 "element": {"#": "PosSize"}, 40 "element": {"#": "PosSize"},
41 "content" : {"@": "PosSize"}, 41 "content" : {"@": "positionSize"},
42 "name" : "Position And Size" 42 "name" : "Position And Size"
43 } 43 }
44 }, 44 },
45 "PosSize": { 45
46 "prototype": "js/panels/properties.reel/sections/position-and-size.reel[PosSize]" 46 "positionSize": {
47 "prototype": "js/panels/properties.reel/sections/position-size.reel"
47 }, 48 },
49
48 "threeDSection": { 50 "threeDSection": {
49 "prototype": "js/panels/properties.reel/section.reel", 51 "prototype": "js/panels/properties.reel/section.reel",
50 "properties": { 52 "properties": {
@@ -97,7 +99,7 @@
97 "elementName": {"@": "elementName"}, 99 "elementName": {"@": "elementName"},
98 "elementClass": {"@": "elementClass"}, 100 "elementClass": {"@": "elementClass"},
99 "elementId": {"@": "elementId"}, 101 "elementId": {"@": "elementId"},
100 "positionSize": {"@": "PosSize"}, 102 "positionSize": {"@": "positionSize"},
101 "threeD": {"@": "threeDProperties"} 103 "threeD": {"@": "threeDProperties"}
102 } 104 }
103 } 105 }
diff --git a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.css b/js/panels/properties.reel/sections/position-size.reel/position-size.css
index 7f8fdbc2..7f8fdbc2 100755
--- a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.css
+++ b/js/panels/properties.reel/sections/position-size.reel/position-size.css
diff --git a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.html b/js/panels/properties.reel/sections/position-size.reel/position-size.html
index 75cb2944..5d1a805a 100755
--- a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.html
+++ b/js/panels/properties.reel/sections/position-size.reel/position-size.html
@@ -6,11 +6,11 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
6</copyright> --> 6</copyright> -->
7<html lang="en"> 7<html lang="en">
8<head> 8<head>
9 <link rel="stylesheet" href="position-and-size.css" type="text/css"> 9 <link rel="stylesheet" href="position-size.css" type="text/css">
10 <script type="text/montage-serialization"> 10 <script type="text/montage-serialization">
11 { 11 {
12 "owner": { 12 "owner": {
13 "prototype" : "js/panels/properties.reel/sections/position-and-size.reel[PosSize]", 13 "prototype" : "js/panels/properties.reel/sections/position-size.reel",
14 "properties" : { 14 "properties" : {
15 "element" : {"#": "section"}, 15 "element" : {"#": "section"},
16 "position": {"#": "position"}, 16 "position": {"#": "position"},
@@ -46,6 +46,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
46 "value": {"<<->": "@owner.topPosition"} 46 "value": {"<<->": "@owner.topPosition"}
47 } 47 }
48 }, 48 },
49
49 "PosH": { 50 "PosH": {
50 "prototype": "js/components/hottextunit.reel[HotTextUnit]", 51 "prototype": "js/components/hottextunit.reel[HotTextUnit]",
51 "properties": { 52 "properties": {
@@ -55,6 +56,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
55 "value": {"<<->": "@owner.heightSize"} 56 "value": {"<<->": "@owner.heightSize"}
56 } 57 }
57 }, 58 },
59
58 "PosW": { 60 "PosW": {
59 "prototype": "js/components/hottextunit.reel[HotTextUnit]", 61 "prototype": "js/components/hottextunit.reel[HotTextUnit]",
60 "properties": { 62 "properties": {
diff --git a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.js b/js/panels/properties.reel/sections/position-size.reel/position-size.js
index 8842558b..10e084be 100755
--- a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.js
+++ b/js/panels/properties.reel/sections/position-size.reel/position-size.js
@@ -7,7 +7,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
7var Montage = require("montage/core/core").Montage; 7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component; 8var Component = require("montage/ui/component").Component;
9 9
10exports.PosSize = Montage.create(Component, { 10exports.PositionSize = Montage.create(Component, {
11 leftPosition: { 11 leftPosition: {
12 value: 0 12 value: 0
13 }, 13 },
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index e66c5b7b..deed4112 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -387,9 +387,9 @@ exports.Stage = Montage.create(Component, {
387 handleMousewheel: { 387 handleMousewheel: {
388 value: function(event) { 388 value: function(event) {
389 if(event._event.wheelDelta > 0) { 389 if(event._event.wheelDelta > 0) {
390 this._iframeContainer.scrollTop -= 20; 390 this.application.ninja.currentDocument.model.views.design.document.body.scrollTop -= 20;
391 } else { 391 } else {
392 this._iframeContainer.scrollTop += 20; 392 this.application.ninja.currentDocument.model.views.design.document.body.scrollTop += 20;
393 } 393 }
394 } 394 }
395 }, 395 },