mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🎉 Add function to retrieve caret position
This commit is contained in:
@@ -528,6 +528,13 @@
|
||||
Module._init_shapes_pool(1);
|
||||
setupInteraction(canvas);
|
||||
|
||||
canvas.addEventListener('click', (e) => {
|
||||
console.log('click', e.type, e);
|
||||
useShape(uuid);
|
||||
const caretPosition = Module._get_caret_position_at(e.offsetX, e.offsetY);
|
||||
console.log('caretPosition', caretPosition);
|
||||
})
|
||||
|
||||
storeFonts(fonts)
|
||||
|
||||
console.log("text shape", uuid);
|
||||
|
||||
Reference in New Issue
Block a user