base group

This commit is contained in:
hamid zarghami
2026-01-05 12:27:58 +03:30
parent e683b30fa1
commit 61d8e5a814
17 changed files with 607 additions and 231 deletions
@@ -23,12 +23,7 @@ const LinkShape = ({
const shapeRef = useRef<Konva.Text>(null);
const fontWeight = useMemo(() => getFontWeight(obj.fontWeight), [obj.fontWeight]);
useEffect(() => {
if (isSelected && shapeRef.current && transformerRef.current) {
transformerRef.current.nodes([shapeRef.current]);
transformerRef.current.getLayer()?.batchDraw();
}
}, [isSelected, transformerRef]);
// Transformer is managed in EditorCanvas for multi-select support
return (
<Text
@@ -43,11 +38,11 @@ const LinkShape = ({
underline={true}
rotation={obj.rotation || 0}
draggable={draggable}
onClick={() => {
onClick={(e) => {
// در حالت editor، لینک‌ها قابل کلیک نیستند
// این قابلیت در viewer اضافه خواهد شد
if (shapeRef.current) {
onSelect(obj.id, shapeRef.current);
onSelect(obj.id, shapeRef.current, e);
}
}}
onDragEnd={(e) => {