-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.ts
More file actions
26 lines (21 loc) · 676 Bytes
/
Copy pathcode.ts
File metadata and controls
26 lines (21 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
figma.showUI(__html__);
figma.ui.resize(172,180);
//var testdata = '123';
//localStorage.setItem("object", testdata);
figma.ui.onmessage = msg => {
let special_symbols = " ⟶ ";
figma.currentPage.selection.forEach(node => {
if (node.type == 'FRAME') {
if (msg.type === 'change-status') {
if (node.name.indexOf(special_symbols) != -1) {
node.name = node.name.split(special_symbols)[1];
}
node.name = msg.buttonName+special_symbols+ node.name;
}else{
node.name = node.name.split(special_symbols)[1];
localStorage.getItem("object");
}
node.setRelaunchData({ relaunch: '' })
}
});
};