排版調整
This commit is contained in:
@@ -538,7 +538,7 @@
|
||||
self.changeStyle(e.target.getAttribute("data-value"));
|
||||
let style = self.allStyle.find(x => x.styleID == e.target.getAttribute("data-value"));
|
||||
if (style) {
|
||||
let size = self.allSize.find(x => x.name == style.paperSize);
|
||||
let size = self.allSize.find(x => x.id == style.paperSize);
|
||||
if (size) {
|
||||
self.paper.width = size.width;
|
||||
self.paper.height = size.height;
|
||||
@@ -1075,7 +1075,7 @@
|
||||
let el = this.elements.find(x => x.id === id);
|
||||
el.style.visibility = el.style.visibility === "hidden" ? "" : "hidden";
|
||||
//要判斷如果所在位置超出範圍,要拉回來放
|
||||
console.log("displayItem:", this.paper)
|
||||
console.log("displayItem:", this.paper, el)
|
||||
if (el.x > this.paper.width) {
|
||||
el.x = this.paper.width/2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user