1
0
Fork 0

Added way to remove scalebox from part

This commit is contained in:
Joost De Cock 2019-07-16 16:18:28 +02:00
parent ded5795ebe
commit 9fcb116c96

View file

@ -10,6 +10,29 @@ export default {
},
macros: {
scalebox: function(so) {
// Passing `false` will remove the scalebox
if (so === false) {
for (let id of [
"__scaleboxMetricTopLeft",
"__scaleboxMetricTopRight",
"__scaleboxMetricBottomRight",
"__scaleboxMetricBottomLeft",
"__scaleboxImperialTopLeft",
"__scaleboxImperialTopRight",
"__scaleboxImperialBottomRight",
"__scaleboxImperialBottomLeft",
"__scaleboxLead",
"__scaleboxTitle",
"__scaleboxText",
"__scaleboxLink",
"__scaleboxMetric",
"__scaleboxImperial"
])
delete this.points[id];
for (let id of ["__scaleboxMetric", "__scaleboxImperial"])
delete this.paths[id];
return true;
}
// Box points
this.points.__scaleboxMetricTopLeft = new this.Point(
so.at.x - 50,