Skip to content

Commit 9a075b7

Browse files
committed
Refactoring...
1 parent af2f53f commit 9a075b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+186
-436
lines changed

docs/bundle.css

Lines changed: 11 additions & 235 deletions
Large diffs are not rendered by default.

docs/bundle.css.gz

-443 Bytes
Binary file not shown.

docs/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/main.js.gz

-10 Bytes
Binary file not shown.

src/csseditor/ui/property/ComponentProperty.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class ComponentProperty extends BaseProperty {
5252
this.load();
5353
current.getProps().forEach(it => {
5454
if (this.children[it.key]) {
55-
this.children[it.key].setValue(current[it.key] || it.defaultVallue)
55+
this.children[it.key].setValue(current[it.key] || it.defaultValue)
5656
}
5757
})
5858
}

src/csseditor/ui/view/ElementView.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -536,14 +536,8 @@ export default class ElementView extends UIElement {
536536

537537
[EVENT('refreshCanvas')] (obj) {
538538
if (obj) {
539-
// 하나 짜리 바뀌는건 element view 에서 적용하지 않는다.
540-
if (!this.currentElement) {
541-
this.currentElement = this.getElement(obj.id);
542-
} else if (this.currentElement && this.currentElement.attr('data-id') != obj.id) {
543-
this.currentElement = this.getElement(obj.id);
544-
}
545539

546-
obj.updateFunction(this.currentElement);
540+
this.updateElement(obj);
547541

548542
} else {
549543
this.trigger('addElement')

src/editor/image-resource/Gradient.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,13 @@ export class Gradient extends ImageResource {
206206
return c;
207207
});
208208

209+
if (newColors.length === 1) {
210+
newColors.push(new ColorStep({
211+
color: newColors[0].color,
212+
percent: 100
213+
}))
214+
}
215+
209216
return newColors.map(f => `${f}`).join(",");
210217
}
211218

src/editor/items/Item.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,4 +359,7 @@ export class Item {
359359

360360
return null;
361361
}
362+
363+
364+
updateFunction (element) {}
362365
}

src/editor/items/Layer.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,4 @@ export class Layer extends DomItem {
4141
return this.json.y || Length.px(0)
4242
}
4343

44-
updateFunction (element) {}
45-
4644
}

src/scss/component/button.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
height:50%;
1515
@include arrow_top(3px, black);
1616
margin: 2px;
17-
box-sizing:border-box;
1817
}
1918

2019
&:after {
@@ -26,7 +25,6 @@
2625
bottom:0px;
2726
top:50%;
2827
@include arrow_bottom(3px, black);
29-
margin: 2px;
30-
box-sizing:border-box;
28+
margin: 2px;
3129
}
3230
}

0 commit comments

Comments
 (0)