添加画布颜色历史

This commit is contained in:
X1627315083
2024-09-27 16:31:33 +08:00
parent e26d57dd76
commit 21b0af1365
32 changed files with 423 additions and 885 deletions

View File

@@ -104,7 +104,6 @@ class myCanvas {
this.canvas.on("object:added", (event)=>{
if(!this.isLoadCanvas)this.updateCanvasState('')
});
return this.canvas
}
@@ -135,10 +134,8 @@ class myCanvas {
canvasClear(){
let oldCanvasDom = this.canvasDomParent.querySelector('.canvas-container')
let oldCanvasDom1 = this.canvasDomParent.querySelector('canvas')
if(oldCanvasDom)oldCanvasDom.remove()
if(oldCanvasDom1)oldCanvasDom1.remove()
document.removeEventListener("keydown", this.canvasKeyDown);
document.removeEventListener("keyup", this.canvasKeyUp);

View File

@@ -30,7 +30,6 @@ function base64ToFile(base64,filename) {
// 创建 File 对象
const file = new File([byteArray], filename, { type: 'image/jpeg' }); // 根据需要的类型进行修改
console.log(file);
return file;
}
//base64转成blob

View File

@@ -7,7 +7,6 @@ class MyWs {
this.messageUrl = http+'/notification'
}
linkWs(url) {
console.log(this.ws && this.ws.readyState == 1);
if (this.ws && this.ws.readyState == 1) return
this.ws = new WebSocket(url)
this.ws.onmessage = (e)=>{
@@ -17,14 +16,11 @@ class MyWs {
console.error('websocket',error)
}
}
console.log(this.ws);
}
static receiveText(data,call){
console.log('receive',data);
MyEvent.emit('getMessage',data)
}
sendMessage(data) {
console.log(this);
if (this.ws && this.ws.readyState == 1) {
let obj = {
cmd: 1,
@@ -50,7 +46,6 @@ class MyWs {
}
}
send(obj) {
console.log(2323);
this.ws.send(JSON.stringify(obj))
}
close(){