base mask

This commit is contained in:
hamid zarghami
2026-01-04 10:18:49 +03:30
parent b33b7a953d
commit aa6153d289
16 changed files with 435 additions and 52 deletions
+7 -3
View File
@@ -25,8 +25,12 @@ const LayersList = () => {
}
}
const getLayerLabel = (type: string) => {
switch (type) {
const getLayerLabel = (obj: typeof objects[0]) => {
if (obj.isMask) {
return 'ماسک'
}
switch (obj.type) {
case 'text':
return 'متن'
case 'rectangle':
@@ -60,7 +64,7 @@ const LayersList = () => {
)}
>
<div className="shrink-0">{getLayerIcon(obj.type)}</div>
<div className="flex-1 text-xs">{getLayerLabel(obj.type)}</div>
<div className="flex-1 text-xs">{getLayerLabel(obj)}</div>
<div className="flex items-center gap-1.5">
<button
onClick={(e) => {