UNDO ? REDO ??? ???? ?? Konva.js?? ?? ??? ?? ???? ???? ??? ??????
Apr 04, 2025 pm 04:30 PMkonva.js? ?? ??? ???? ?? ?? redo ?? ??
? ????? ?? ??? ???? UNDO (Ctrl Z) ? redo (Ctrl y) ??? Konva.js ??? ?? ?????? ???? ??? ?????. ??? ??? ?? ??? ????? ?? ??? ???? ??? ??? ???? ??? ??? ?? ? ?? ??? ?????.
?? ?? Command
???? ??????.
??? ?? { ??? () { this.states = []; // ?? ?? ?? ???? ? ??} ????() { ? ??? ????? ( '?? ??? ????? ?'); } undo () { ? ??? ????? ( '?? ?? ??? ???? ?'); } ?? (?) { this.states.push (state); } Restorestate () { this.states.pop () ||? ?????? ?; // ?? ?? ?? NULL? ????? } }
????, ???? ??? ??? ?? ?? ?? ???? ????.
Class DrawRectAngleCommand ?? ?? { ??? (????, ???, ??) { ???(); this.stage = ??; this.layer = ???; this.rect = rect; } ????() { this.savestate (this.layer.tojson ()); // ?? ??? ??? ?? this.layer.add (this.rect); this.layer.draw (); } undo () { this.rect.destroy (); const prevstate = this.restorestate (); if (prevstate) { this.layer.destroychildren (); // ???? ????? .layer = konva.node.create (prevstate, this.stage); // ?? ??? ?? this.stage.add (this.layer); this.layer.draw (); } } }
?? ?? ?? ???? ??????.
??? CommandManager { ??? () { this.undostack = []; this.redostack = []; } executeCommand (??) { command.execute (); this.undostack.push (??); this.redostack = []; // ? ??? ?? ? ? Redo Stack? ?????} undo () { if (this.undostack.length === 0) ??; const command = this.undostack.pop (); command.undo (); this.redostack.push (??); } redo () { if (this.redostack.length === 0) ??; const command = this.redostack.pop (); command.execute (); this.undostack.push (??); } }
????? Konva.js ?? ?????? ??????.
Const Stage = New Konva.Stage ({{ ???? : '????', ?? : Window.InnerWidth, ?? : Window.innerHeight }); const layer = new Konva.layer (); stage.add (???); const CommandManager = new CommandManager (); stage.on ( 'click', (e) => { const rect = new konva.rect ({ X : e.evt.layerx, Y : e.evt.layery, ?? : 50, ?? : 50, ??? : '???', Draggable : True }); const command = new DrawRectAngleCommand (Stage, Layer, rect); CommandManager.ExecuteCommand (??); }); document.addeventListener ( 'keydown', (e) => { if (e.ctrlkey && e.key === 'z') { CommandManager.undo (); } else if (e.ctrlkey && e.key === 'y') { CommandManager.redo (); } });
? ??? ??? ??? ??? ?? ??? ?????. ??, ????, ?? ?? ?? ?? ??? ??? ???? ?? Command
???? ?? ? ? ????. ? ??? execute
???? ?? ??? ???? undo
???? ?? ??? ???????. ????? ?? ?? ?? ??? ???? ?????.
? ??? UNDO ? REDO ??? ???? ?? Konva.js?? ?? ??? ?? ???? ???? ??? ??????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

PHP?? ?? ?? ??? ???? ?? ??? ? ???? ?? ??? ???? ?? ??? ???? ???? ????. 1. ?? ?? ??? ?? ??? URL ? ?? ??? ????. 2. UrlenCode? ???? ?? ??? ???????. 3. ? ???? ????? ?? ?? ??? ? ?? ??? ?????. 4. ???? ???? ?? ? ? ??? ??? ??? ??? ?????. 5. ??? ?? ??? ????? ?? ????? OG ??? ???? ?????. 6. XSS ??? ???? ?? ??? ??? ?????. ? ???? ??? ??? ???? ??? ?? ?? ??? ??? ???? ??? ?? ??? ?????.

AI? ??? ??? ?? ?? ? ?? ???? ????? ?? ??? ??????. 1. Baidu, Tencent API ?? ?? ?? NLP ?????? ?? ??? AI ?? ?? API? ??????. 2. PHP? ? ?? guzzle? ?? API? ???? ?? ??? ??????. 3. ?? ????? ?? ?? ??? ???? ???? ???? ??? ??? ? ????. 4. ?? ?? ? ?? ???? ?? PHP-L ? PHP_CODESNIFFER? ??????. 5. ???? ????? ???? ?? ?? ??? ?????? ??? ??????. AIAPI? ??? ? ???, ?? ??, ?? ? PHP ?? ??? ??? ???. ?? ???? PSR ??? ???, ??? ????? ????, ?? ??? ???, ????? ??? ????, X? ???????.

??? ?? ??? ??? ?? JavaScript? MediareCorder API? ?? PHP ???? ???? ?????. 2. PHP? ???? ?? ??? ???? STTAPI (? : Google ?? Baidu ?? ??)? ???? ???? ?????. 3. PHP? ???? AI ??? (? : OpenAigpt)? ????. 4. ?? ?? PHP? TTSAPI (? : Baidu ?? Google ?? ??)? ???? ??? ?? ??? ?????. 5. PHP? ?? ??? ??? ??? ??? ?? ?? ??? ?????. ?? ????? PHP? ?? ???? ?? ?? ?? ??? ??? ?????.

PHP? ?????? ????? ?? ?? ?? ???? ???? ?? ???? ???? ?? ?? ???? ?????. 2. ?? ??? ???? ???? ?? ??? ?? ? ??? ??? ???? ?? API/Webhook ??? ??? ?? ???? ??? ??? ??? ??? ?????. 3. ?? ????? ?? ??, ??/???? ????, ???? ??, ???? ? ??? ?????? ????? ?? ??? ???? ???? ?? Dingtalk, SMS ?? ??? ???? ??? ?????? ???? ?? ? ??? ??? ????? ?? ??? ???? ???????.

AI ?? API? ??? ? ???, ??, ?? ?? ? ?? ???? ??? ???????. 2. PHP? Guzzle? ???? ??? ??? ??? JSON_DECODE? ???? ?? ? JSON ???? ???? ?? ? ?? ?? ?????? ?????. 3. AI ???? ????? ????? ?? ????? ??? ? ??? ??? ???????. 4. ??, ??? ? ? ?? ?? ??? ???? ???? ?? ?? ??? ??? ?? ??? ??? ? ? ????.

2025 ? ?? 10 ? ???? ?? ?? ?? ? ??? ?? ???? ??? ????. 1. CoinmarketCap, ??? ? ?? ?? ?? ? ?? ?? ???? ?????. 2. Coingecko, ??? ? ?? ??? ??? ???? ?? ??; 3. ?? ???? K ?? ?? ? ?? ?? ??? ??? TradingView; 4. Binance Market, ?? ???? ??? ???? ?? ? ???? ?????. 5. OUYI ??, ?? ?? ? ?? ??? ?? ?? ?? ??? ?????. 6. ?? ?? ? ??? ?? ???? ?? ?? ???? ??? ? Glassnode; 7. Messari, ?? ??? ?? ??? ? ??? ??? ? ??? ??; 8. cryptocompa

? ??? Twilio? Call Hold and Unhold? ???? ? ?? ?? ??? ??? ?????. ???? ??? Twilio? ???? ??? ???? ?? ??? ???? ?????? ?? ?? ? ??? ?? ????? ?? ??? ??? ???? ????. ? ?? ???? ? ??? TWIML ??? ???? ?? ? ??? ??? ?? ?? ??? ??? ????. ? ??? ???? Twilio ?? ??? ????? ??? ? ??? ?? ?? ?? ? ?? ??? ?????.

? ??? PHP?? ??? ??? ? ?? ?? ??? ???? Array_Column () ??? ?? ?? ??? ???? ?? ??????. ?? ??? PHP ? ??? ??? PHP? ?? ?? ?? ???? ???? ?? ??? ???? ???? ? ?? ???? ??? ???? ?? ? ??? ?????.
