Skip to content

Commit

Permalink
modify svg path bounding size
Browse files Browse the repository at this point in the history
  • Loading branch information
easylogic committed Jun 14, 2020
1 parent ef29057 commit 94cb28b
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 19 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.d515be01f10bb5a2f1e3.css" rel="stylesheet"></head> <body><script type="text/javascript" src="main.803b437f16fecbf1b9d2.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.d6a4e3d003f1043a3454.css" rel="stylesheet"></head> <body><script type="text/javascript" src="main.974fb8fd649466426b31.js"></script></body> </html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@easylogic/editor",
"version": "0.9.51",
"version": "0.9.52",
"description": "Fantastic Web Design Tool ",
"main": "./dist/editor.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manifest_version": 2,
"version": "0.9.51",
"version": "0.9.52",
"name": "EasyLogic Studio",
"description": "Fantastic Web Design Tool ",
"author": "easylogic",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/whale/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manifest_version": 2,
"version": "0.9.51",
"version": "0.9.52",
"name": "EasyLogic Studio",
"description": "Fantastic Web Design Tool, Web 디자인 툴 ",
"author": "easylogic",
Expand Down
6 changes: 5 additions & 1 deletion src/csseditor/ui/view-items/SelectionToolView.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ const SelectionToolEvent = class extends UIElement {
if (current && current.is('svg-path', 'svg-brush', 'svg-textpath')) {
this.toggleEditingPath(true);

// box 모드
// box - x, y, width, height 고정된 상태로 path 정보만 변경
// canvas - x, y, width, height 를 path 좌표로 재구성
this.emit('showPathEditor', 'modify', {
changeEvent: 'updatePathItem',
current,
d: current.d,
box: current.is('svg-textpath') ? 'box': 'canvas',
// box: current.is('svg-textpath') ? 'box': 'canvas',
box: 'box',
screenX: current.screenX,
screenY: current.screenY,
screenWidth: current.screenWidth,
Expand Down
12 changes: 6 additions & 6 deletions src/editor/items/layers/SVGPathItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ export class SVGPathItem extends SVGItem {
this.json.path.resetSegment(obj.segments);
}

if (obj.rect) {
// if (obj.rect) {

this.json.width = Length.px(obj.rect.width);
this.json.height = Length.px(obj.rect.height);
// this.json.width = Length.px(obj.rect.width);
// this.json.height = Length.px(obj.rect.height);

this.setScreenX(Length.px(obj.rect.x))
this.setScreenY(Length.px(obj.rect.y))
}
// this.setScreenX(Length.px(obj.rect.x))
// this.setScreenY(Length.px(obj.rect.y))
// }

}

Expand Down
4 changes: 2 additions & 2 deletions src/scss/csseditor/path-editor-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@
.svg-canvas {
fill: transparent;
stroke: $selected-border-color;
stroke-width: 0.5;
display: none;
stroke-width: 1;
// display: none;
}

path {
Expand Down
2 changes: 1 addition & 1 deletion src/scss/themes/csseditor/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$inner-border-color: #181818;
$border-color: rgb(49, 49, 49);
$border-color-2: #737373;
$selected-border-color: #609de2;
$selected-border-color: #3a89f0;
$selected-color: #3a89f0;
$selected-color: #fc554f;
$logo-selected-color: #fc554f;
Expand Down

0 comments on commit 94cb28b

Please sign in to comment.