Add 'verbatim' mode to shape drawing
This commit is contained in:
+3
-1
@@ -160,7 +160,7 @@ let tools = {
|
|||||||
},
|
},
|
||||||
"simplifyMode": {
|
"simplifyMode": {
|
||||||
type: "enum",
|
type: "enum",
|
||||||
options: ["corners", "smooth"], // "auto"],
|
options: ["corners", "smooth", "verbatim"], // "auto"],
|
||||||
label: "Line Mode"
|
label: "Line Mode"
|
||||||
},
|
},
|
||||||
"fillShape": {
|
"fillShape": {
|
||||||
@@ -1763,6 +1763,8 @@ class Shape extends BaseShape {
|
|||||||
points.push([curve.points[3].x, curve.points[3].y])
|
points.push([curve.points[3].x, curve.points[3].y])
|
||||||
}
|
}
|
||||||
this.fromPoints(points, error)
|
this.fromPoints(points, error)
|
||||||
|
} else if (mode=="verbatim") {
|
||||||
|
// Just keep existing shape
|
||||||
}
|
}
|
||||||
let epsilon = 0.01
|
let epsilon = 0.01
|
||||||
let newCurves = []
|
let newCurves = []
|
||||||
|
|||||||
+2
-2
@@ -165,8 +165,8 @@ button {
|
|||||||
background-color: #555;
|
background-color: #555;
|
||||||
}
|
}
|
||||||
.stage {
|
.stage {
|
||||||
width: 1500px;
|
width: 100%;
|
||||||
height: 1000px;
|
height: 100%;
|
||||||
/* overflow: scroll; */
|
/* overflow: scroll; */
|
||||||
}
|
}
|
||||||
.stageWrapper {
|
.stageWrapper {
|
||||||
|
|||||||
Reference in New Issue
Block a user