canvas line

This commit is contained in:
Haoming 2025-10-31 12:16:27 +08:00
parent f7cb7cdb0d
commit 22e0861cce
3 changed files with 0 additions and 42 deletions

View File

@ -43,18 +43,6 @@
display: none;
}
.forge-resize-line {
width: 100%;
height: 6px;
background-image: linear-gradient(to bottom, grey 50%, darkgrey 50%);
background-size: 4px 4px;
background-repeat: repeat;
cursor: ns-resize;
position: absolute;
bottom: 0;
left: 0;
}
.forge-toolbar-static {
position: absolute;
top: 0px;

View File

@ -55,5 +55,4 @@
</div>
<div id="scribbleIndicator_forge_mixin" class="forge-scribble-indicator"></div>
</div>
<div class="forge-resize-line" id="resizeLine_forge_mixin"></div>
</div>

View File

@ -64,7 +64,6 @@ class ForgeCanvas {
this.dragging = false;
this.dragged_just_now = false;
this.resizing = false;
this.drawing = false;
this.contrast_pattern = null;
@ -380,31 +379,6 @@ class ForgeCanvas {
scribbleIndicator.style.display = "none";
});
const resizeLine = document.getElementById(`resizeLine_${self.uuid}`);
resizeLine.addEventListener("pointerdown", (e) => {
self.resizing = true;
e.preventDefault();
e.stopPropagation();
});
document.addEventListener("pointermove", (e) => {
if (self.resizing) {
const rect = container.getBoundingClientRect();
const newHeight = e.clientY - rect.top;
container.style.height = `${newHeight}px`;
e.preventDefault();
e.stopPropagation();
}
});
document.addEventListener("pointerup", () => {
self.resizing = false;
});
document.addEventListener("pointerout", () => {
self.resizing = false;
});
function preventDefaults(e) {
e.preventDefault();
e.stopPropagation();
@ -835,6 +809,3 @@ class ForgeCanvas {
drawingCanvas.style.cursor = "grab";
}
}
const True = true;
const False = false;