Skip to content

Commit

Permalink
Refactoring....
Browse files Browse the repository at this point in the history
  • Loading branch information
easylogic committed May 30, 2020
1 parent 64a61b3 commit 33e051e
Show file tree
Hide file tree
Showing 20 changed files with 71 additions and 49 deletions.
2 changes: 1 addition & 1 deletion dist/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html> <html> <head> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-139740394-1"></script> <link rel=icon href=icon.png sizes=128x128> <script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-139740394-1")</script> <script>!function(e,n,a,t){e.dmndata=[],e.jenniferFront=function(e){window.dmndata.push(e)},e.dmnaid=t,e.dmnatime=new Date,e.dmnanocookie=!1,e.dmnajennifer="JENNIFER_FRONT@INTG";var d=6e4*Math.floor((new Date).getTime()/6e4),c=n.createElement(a);c.src="https://d-collect.jennifersoft.com/"+t+"/demian.js?"+d,c.async=!0,n.getElementsByTagName(a)[0].parentNode.appendChild(c)}(window,document,"script","cc474308-b29c-af41-7393-409d285dca6e")</script> <meta charset=utf-8 /> <title>Fantastic Web Design Tool</title> <meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"/> <meta name=description content="You can make simply web with Web editor. "/> <meta name=keywords content=html5,css,svg,editor> <meta name=author content=easylogic> <meta property=og:title content="Fantastic Web Design Tool"/> <meta property=og:type content=website /> <meta property=og:description content="You can make simply web with Web editor. "/> <meta property=og:url content=https://www.easylogic.studio /> <meta property=og:image content=https://www.easylogic.studio/images/editor.png /> <meta property=twitter:card content=summary_large_image> <meta property=twitter:url content=https://www.easylogic.studio> <meta property=twitter:title content="Fantastic Web Design Tool"> <meta property=twitter:description content="You can make simply web with Web editor. "> <meta property=twitter:image content=https://www.easylogic.studio/images/editor.png> <meta name="apple-mobile-web-app-title" content="EasyLogic Studio" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-status-bar-style" content="black" /><link rel="manifest" href="manifest.d340e7a054029504e2ef48b504944d74.json" crossorigin="use-credentials" /><link href="main.d06ee2cb6410bd1849a4.css" rel="stylesheet"></head> <body><script type="text/javascript" src="main.3d45da54b176e9d5d62d.js"></script></body> </html>
<!doctype html> <html> <head> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-139740394-1"></script> <link rel=icon href=icon.png sizes=128x128> <script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-139740394-1")</script> <script>!function(e,n,a,t){e.dmndata=[],e.jenniferFront=function(e){window.dmndata.push(e)},e.dmnaid=t,e.dmnatime=new Date,e.dmnanocookie=!1,e.dmnajennifer="JENNIFER_FRONT@INTG";var d=6e4*Math.floor((new Date).getTime()/6e4),c=n.createElement(a);c.src="https://d-collect.jennifersoft.com/"+t+"/demian.js?"+d,c.async=!0,n.getElementsByTagName(a)[0].parentNode.appendChild(c)}(window,document,"script","cc474308-b29c-af41-7393-409d285dca6e")</script> <meta charset=utf-8 /> <title>Fantastic Web Design Tool</title> <meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"/> <meta name=description content="You can make simply web with Web editor. "/> <meta name=keywords content=html5,css,svg,editor> <meta name=author content=easylogic> <meta property=og:title content="Fantastic Web Design Tool"/> <meta property=og:type content=website /> <meta property=og:description content="You can make simply web with Web editor. "/> <meta property=og:url content=https://www.easylogic.studio /> <meta property=og:image content=https://www.easylogic.studio/images/editor.png /> <meta property=twitter:card content=summary_large_image> <meta property=twitter:url content=https://www.easylogic.studio> <meta property=twitter:title content="Fantastic Web Design Tool"> <meta property=twitter:description content="You can make simply web with Web editor. "> <meta property=twitter:image content=https://www.easylogic.studio/images/editor.png> <meta name="apple-mobile-web-app-title" content="EasyLogic Studio" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-status-bar-style" content="black" /><link rel="manifest" href="manifest.d340e7a054029504e2ef48b504944d74.json" crossorigin="use-credentials" /><link href="main.b7cffefb94633c2507fd.css" rel="stylesheet"></head> <body><script type="text/javascript" src="main.3ef0ac450d8ae77bc9d5.js"></script></body> </html>

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions docs/main.b7cffefb94633c2507fd.css

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions docs/main.d06ee2cb6410bd1849a4.css

This file was deleted.

2 changes: 1 addition & 1 deletion docs/service-worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/csseditor/ui/property-editor/InputRangeEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class InputRangeEditor extends UIElement {
[layoutClass] : true
})
})}>
${label ? `<label>${label}</label>` : '' }
${label ? `<label title="${label}">${label}</label>` : '' }
<div class='range-editor-type' data-type='range'>
<div class='area'>
<input type='number' ref='$propertyNumber' value="${realValue}" min="${min}" max="${max}" step="${step}" tabIndex="1" />
Expand Down
2 changes: 1 addition & 1 deletion src/csseditor/ui/property-editor/NumberRangeEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class NumberRangeEditor extends UIElement {

return /*html*/`
<div class='number-range-editor ${hasLabel} ${isRemovable} ${layoutClass}' data-selected-type='${type}'>
${label ? `<label>${label}</label>` : '' }
${label ? `<label title="${label}">${label}</label>` : '' }
<div class='range-editor-type' data-type='range'>
<div class='area'>
<input type='range' ref='$property' value="${realValue}" min="${min}" max="${max}" step="${step}" />
Expand Down
2 changes: 1 addition & 1 deletion src/csseditor/ui/property-editor/RangeEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class RangeEditor extends UIElement {
[layoutClass] : true
})
})}>
${label ? `<label>${label}</label>` : '' }
${label ? `<label title="${label}">${label}</label>` : '' }
<div class='range-editor-type' data-type='range'>
<input type='range' ref='$property' value="${realValue}" min="${min}" max="${max}" step="${step}" />
<div class='area' ref='$rangeArea'>
Expand Down
2 changes: 1 addition & 1 deletion src/csseditor/ui/property-editor/SelectEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class SelectEditor extends UIElement {
var hasTabIndex = !!tabIndex ? 'tabIndex="1"' : ''
return /*html*/`
<div class='select-editor ${hasLabel}'>
${label ? `<label>${label}</label>` : '' }
${label ? `<label title="${label}">${label}</label>` : '' }
<select ref='$options' ${hasTabIndex}></select>
</div>
`
Expand Down
2 changes: 1 addition & 1 deletion src/csseditor/ui/property-editor/SelectIconEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class SelectIconEditor extends UIElement {
var hasLabel = !!label ? 'has-label' : ''
return /*html*/`
<div class='select-icon-editor ${hasLabel}'>
${label ? `<label>${label}</label>` : '' }
${label ? `<label title="${label}">${label}</label>` : '' }
<div class='items' ref='$options'></div>
</div>
`
Expand Down
12 changes: 11 additions & 1 deletion src/csseditor/ui/property-editor/StrokeDashArrayEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ export default class StrokeDashArrayEditor extends UIElement {
<div class='dasharray-item'>
<NumberRangeEditor
ref='$${num}'
label='${num}'
label='${num}'
key='${index}'
value="0"
min="0"
max="1000"
step="1"
onchange="changeRangeEditor"
/>
<button type="button" data-index="${index}" class='delete'>${icon.remove2}</button>
</div>
`
});
Expand All @@ -90,6 +91,15 @@ export default class StrokeDashArrayEditor extends UIElement {
this.refresh();
}

[CLICK('$body .delete')] (e) {
const index = +e.$dt.attr('data-index');

this.state.value.splice(index, 1);

this.refresh();
this.modifyStrokeDashArray();
}


modifyStrokeDashArray () {
this.parent.trigger(this.props.onchange, this.props.key, this.toStringValue(), this.props.params);
Expand Down
4 changes: 2 additions & 2 deletions src/csseditor/ui/property/BackgroundColorProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default class BackgroundColorProperty extends BaseProperty {
ref='$zIndex'
key='z-index'
label='${this.$i18n('background.color.property.zindex')}'
min="-1"
max="100000"
min="-1000"
max="1000"
step="1"
onchange="changeSelect" />
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/scss/csseditor/editor/input-range-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ $border-radius: 3px;
text-align: left;
vertical-align: middle;
padding: 2px 0px 2px 0px;

font-size: 11px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}

&.block {
Expand Down
6 changes: 4 additions & 2 deletions src/scss/csseditor/editor/number-range-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
text-align: left;
vertical-align: middle;
padding: 7px 0px 2px 0px;

font-size: 12px;
font-size: 11px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}

&.block {
Expand Down
4 changes: 3 additions & 1 deletion src/scss/csseditor/editor/range-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ $border-radius: 3px;
text-align: left;
vertical-align: middle;
padding: 7px 0px 2px 0px;

font-size: 11px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}

&.block {
Expand Down
3 changes: 3 additions & 0 deletions src/scss/csseditor/editor/select-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
vertical-align: middle;
padding: 6px 4px 2px 0px;
font-size: 11px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;

}

Expand Down
4 changes: 3 additions & 1 deletion src/scss/csseditor/editor/select-icon-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
vertical-align: middle;
padding: 6px 4px 2px 0px;
font-size: 11px;

white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}

Expand Down
11 changes: 6 additions & 5 deletions src/scss/csseditor/editor/stroke-dasharray-editor.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
.stroke-dasharray-editor {
.dasharray-item {
margin-bottom: 3px;
display:grid;
grid-template-columns: 1fr 20px;
grid-column-gap: 2px;

}


> .tools {
label {
color: $font-color;
svg {
width: 16px;
height: 16px;
}
color: $selected-font-color;
vertical-align: middle;
cursor: pointer;
}
}

Expand Down

0 comments on commit 33e051e

Please sign in to comment.