From fadf2a5f05c9b3e19caa2f18fc6d4d0e1e4fb02f Mon Sep 17 00:00:00 2001
From: Jon Reid
Date: Thu, 24 May 2012 16:06:02 -0700
Subject: Timeline: Bug fix IKNINJA 1566: Adding a css style property makes the
blow layer name disappear.
---
js/panels/Timeline/Style.reel/css/Style.css | 79 ++++++---------------------
js/panels/Timeline/Style.reel/scss/Style.scss | 3 +
2 files changed, 19 insertions(+), 63 deletions(-)
(limited to 'js/panels/Timeline')
diff --git a/js/panels/Timeline/Style.reel/css/Style.css b/js/panels/Timeline/Style.reel/css/Style.css
index 6c7542cb..0cc8a1f8 100644
--- a/js/panels/Timeline/Style.reel/css/Style.css
+++ b/js/panels/Timeline/Style.reel/css/Style.css
@@ -1,88 +1,36 @@
-/* Layer.scss
- * Main SCSS file for Layer component, compiled by SASS into the file css/Layer.css.
- */
/*
This file contains proprietary software owned by Motorola Mobility, Inc.
No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
*/
-/*
- * _colors.scss
- * Defines the colors for the UI of the application.
- * To create a new theme, copy this file and change the values as desired.
- * Note: Some colors are defined as both rgb and rgba; some of the rgba versions have multiple a values.
- */
-/* Colors for radio buttons and other form elements */
-/* Base colors for dividers
- *
- * Dividers consist of a div with a background color and either
- * a top & bottom border (in the case of horizontal dividers)
- * or a left & right border (in the case of vertical dividers),
- * for a total of three different colors.
- *
- */
-/* top and left */
-/* Middle */
-/* Bottom and right */
-/* Main background color of entire app */
-/* Main app background color. */
-/* rgba version */
-/* Main app border color */
-/* color of drop shadows */
-/* Stage color */
-/* body border color */
-/* Body background color */
-/* Colors for main dropdown menus: background & text for both regular and highlighted states, dividers */
-/* Colors for tools: background, text, how they interact with the UI */
-/* Colors for panels: background & text, both regular and highlighted states, dividers, borders, shadows, etc. */
-/* used for editable items in their non-edit state, etc. */
-/* Border for panel and for block elements */
-/* Shadow for text and block elements */
-/* Colors for scroll bars */
-/*
- This file contains proprietary software owned by Motorola Mobility, Inc.
- No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
- (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
- */
-/*
- * themes/themename/mixins.scss
- * Mixins that are theme-dependent (e.g. sprite mixins, etc)
- */
-/*
- This file contains proprietary software owned by Motorola Mobility, Inc.
- No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
- (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
- */
-/*
- * mixins.scss
- * Generic mixins. Theme-specific mixins (e.g. for sprites)
- * should go in the theme/themename/mixins.scss file.
+/* Layer.scss
+ * Main SCSS file for Layer component, compiled by SASS into the file css/Layer.css.
*/
-/* line 12, ../scss/Style.scss */
+/* line 18, ../scss/Style.scss */
.hidden {
display: none;
}
-/* line 15, ../scss/Style.scss */
+/* line 21, ../scss/Style.scss */
.row-editor {
position: relative;
height: 14px;
}
-/* line 19, ../scss/Style.scss */
+/* line 25, ../scss/Style.scss */
.style-padding {
padding-left: 5px;
padding-top: 3px;
padding-right: 5px;
}
-/* line 24, ../scss/Style.scss */
+/* line 30, ../scss/Style.scss */
.style-row {
height: 20px;
border-bottom: 1px solid #505050;
}
-/* line 29, ../scss/Style.scss */
+/* line 35, ../scss/Style.scss */
div.content-style div.editable2 {
height: 14px;
background-color: #242424 !important;
@@ -96,7 +44,7 @@ div.content-style div.editable2 {
width: 100%;
}
-/* line 43, ../scss/Style.scss */
+/* line 49, ../scss/Style.scss */
.content-style.collapsible-content,
.content-style.collapsible-content div,
.content-style.collapsible-content span {
@@ -104,7 +52,7 @@ div.content-style div.editable2 {
text-overflow: visible;
}
-/* line 48, ../scss/Style.scss */
+/* line 54, ../scss/Style.scss */
div.content-style div.cell-property,
div.content-style div.cell-value {
width: 45%;
@@ -116,7 +64,7 @@ div.content-style div.cell-value {
line-height: 18px;
}
-/* line 57, ../scss/Style.scss */
+/* line 63, ../scss/Style.scss */
div.content-style div.cell-property div {
min-width: 90%;
height: 100%;
@@ -125,9 +73,14 @@ div.content-style div.cell-property div {
white-space: nowrap;
}
-/* line 65, ../scss/Style.scss */
+/* line 71, ../scss/Style.scss */
div.content-style input.nj-skinned {
height: 10px;
font-size: 12px;
top: -3px;
}
+
+/* line 76, ../scss/Style.scss */
+div.style-row .container-propvals {
+ overflow: hidden;
+}
diff --git a/js/panels/Timeline/Style.reel/scss/Style.scss b/js/panels/Timeline/Style.reel/scss/Style.scss
index 30bf43fe..66028cbe 100644
--- a/js/panels/Timeline/Style.reel/scss/Style.scss
+++ b/js/panels/Timeline/Style.reel/scss/Style.scss
@@ -73,4 +73,7 @@ div.content-style input.nj-skinned {
font-size: 12px;
top: -3px;
}
+div.style-row .container-propvals {
+ overflow: hidden;
+}
--
cgit v1.2.3
From 811ce7a7cdec18f304c6660a70012960e61d967a Mon Sep 17 00:00:00 2001
From: Jon Reid
Date: Thu, 24 May 2012 17:46:47 -0700
Subject: Timeline: bug fix "Layer name gets doubled" (Spreadsheet)
---
js/panels/Timeline/Layer.reel/Layer.html | 3 ++-
js/panels/Timeline/Layer.reel/Layer.js | 44 ++++++++++++++++++++++----------
2 files changed, 33 insertions(+), 14 deletions(-)
(limited to 'js/panels/Timeline')
diff --git a/js/panels/Timeline/Layer.reel/Layer.html b/js/panels/Timeline/Layer.reel/Layer.html
index c7e7b575..44022211 100644
--- a/js/panels/Timeline/Layer.reel/Layer.html
+++ b/js/panels/Timeline/Layer.reel/Layer.html
@@ -17,6 +17,7 @@
"styleRepetition" : {"@":"repetition1"},
"dynamicLayerName" : {"@":"dtext1"},
"dynamicLayerTag" : {"@": "dtext2"},
+ "layer_label_text" : {"#": "layer-label-text"},
"mainCollapser" : {"@" : "mainCollapser"},
"positionCollapser" : {"@" : "positionCollapser"},
"styleCollapser" : {"@" : "styleCollapser"},
@@ -33,7 +34,7 @@
"value" : {
"boundObject" : {"@": "owner"},
"boundObjectPropertyPath" : "layerName",
- "oneway" : false
+ "oneway" : true
}
}
},
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 8df0e9ae..db99e869 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -74,7 +74,7 @@ var Layer = exports.Layer = Montage.create(Component, {
/* Layer models: the name, ID, and selected and animation booleans for the layer */
_layerName:{
- value: "Default Layer Name"
+ value: ""
},
layerName:{
@@ -83,13 +83,22 @@ var Layer = exports.Layer = Montage.create(Component, {
return this._layerName;
},
set:function(newVal){
- this._layerEditable.value = newVal;
- this._layerName = newVal;
- this.layerData.layerName = newVal;
+ if (this._layerEditable.value !== newVal) {
+ this._layerEditable.value = newVal;
+ }
+ if (this._layerName !== newVal) {
+ this._layerName = newVal;
+ }
+ if (this.layerData.layerName !== newVal) {
+ this.layerData.layerName = newVal;
+ }
+
if (typeof(this.dynamicLayerName) !== "undefined") {
- this.dynamicLayerName.value = newVal;
+ if (this.dynamicLayerName.value !== newVal) {
+ this.dynamicLayerName.value = newVal;
+ }
}
-
+ this.needsDraw = true;
}
},
_layerID:{
@@ -513,6 +522,11 @@ var Layer = exports.Layer = Montage.create(Component, {
//console.log('Layer.draw, removing selection for layer ', this.layerName)
this.element.classList.remove("layerSelected");
}
+
+ // Update layer name?
+ if (this.layerName !== this.layer_label_text.innerText) {
+ this.layer_label_text.innerText = this.layerName;
+ }
}
},
didDraw: {
@@ -678,10 +692,12 @@ var Layer = exports.Layer = Montage.create(Component, {
/* Begin: Event handlers */
handleLayerNameChange: {
value: function(event) {
- this.dynamicLayerName.value = this._layerEditable.value;
- this.needsDraw = true;
- this.application.ninja.documentController.activeDocument.needsSave = true;
- this.layerData.stageElement.setAttribute("id",this.dynamicLayerName.value);
+
+ if (this._layerEditable.value !== this.layerName) {
+ this.layerName = this._layerEditable.value;
+ this.application.ninja.documentController.activeDocument.needsSave = true;
+ this.layerData.stageElement.setAttribute("id",this._layerEditable.value);
+ }
}
},
handleAddStyleClick: {
@@ -706,10 +722,12 @@ var Layer = exports.Layer = Montage.create(Component, {
if (this._layerEditable.enteredValue.length === 0) {
newVal = this._layerEditable._preEditValue;
}
- this.dynamicLayerName.value = newVal;
this.layerName = newVal;
- this.application.ninja.documentController.activeDocument.needsSave = true;
- this.needsDraw = true;
+ if (newVal !== this.layerName) {
+ this.layerName = newVal;
+ this.application.ninja.documentController.activeDocument.needsSave = true;
+ this.layerData.stageElement.setAttribute("id", newVal);
+ }
}
},
handleMousedown: {
--
cgit v1.2.3
From b0a736deb4f3bb515e0ca4009fe4f98e22cec2c0 Mon Sep 17 00:00:00 2001
From: Jon Reid
Date: Fri, 25 May 2012 10:15:48 -0700
Subject: Timeline: Better fix for keeping styles/tracks in synch when adding
styles on document open.
---
js/panels/Timeline/Layer.reel/Layer.js | 8 +++++++-
js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 3 ---
2 files changed, 7 insertions(+), 4 deletions(-)
(limited to 'js/panels/Timeline')
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index db99e869..45d6f0a3 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -579,10 +579,11 @@ var Layer = exports.Layer = Montage.create(Component, {
// newStyle = LayerStyle.create(),
newStyle = {},
newEvent = document.createEvent("CustomEvent");
-
+ /*
this.isStyleCollapsed = false;
this.layerData.isStyleCollapsed = false;
this.triggerOutgoingBinding();
+ */
newEvent.initCustomEvent("layerEvent", false, true);
newEvent.layerEventLocale = "styles";
@@ -702,6 +703,11 @@ var Layer = exports.Layer = Montage.create(Component, {
},
handleAddStyleClick: {
value: function(event) {
+
+ this.isStyleCollapsed = false;
+ this.layerData.isStyleCollapsed = false;
+ this.triggerOutgoingBinding();
+
this.addStyle();
}
},
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 9c8b5206..8fd62187 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -976,9 +976,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
restoredStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex;
this.arrStyleTracks.push(restoredStyleTrack);
-
- this.isStyleCollapsed = true;
- this.triggerOutgoingBinding();
}
else if (layerEvent.layerEventType === "deleteStyle") {
// TODO: Delete the right track. Index can be passed in event object, use that for splice().
--
cgit v1.2.3