Skip to content

Instantly share code, notes, and snippets.

@gurdasnijor
Last active December 3, 2019 21:31
Show Gist options
  • Save gurdasnijor/712ce27388b3ba2e6ac58d92f4e4c31b to your computer and use it in GitHub Desktop.
Save gurdasnijor/712ce27388b3ba2e6ac58d92f4e4c31b to your computer and use it in GitHub Desktop.
Visual Tagger
Visual Tagger
Initial*
create tag -> Tag Highlighting State
delete tag -> Delete Tag State
Delete Tag State
confirm -> Initial
cancel -> Initial
Tag Highlighting State
element click -> Editing Tag State
Editing Tag State
update tag selector -> Tag Highlighting State
validating -> Validating State
bind dynamic property -> Property Highlighting State
Property Highlighting State
element click -> Editing Tag State
cancel -> Editing Tag State
Validating State
element click -> Editing Tag State
const figmaFile = "Bze73iesz7XXrJdRpUUKm6";
// **TODO: add the rest of the screens (including "Validating State")
const figmaNodes = {
"Initial": "754%3A1053",
"Tag Highlighting State": "754%3A123",
"Editing Tag State": "754%3A1735",
"Property Highlighting State": "754%3A3548"
};
const figmaURL = "https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/file/" + figmaFile + "/Visual-Tagger?node-id=";
function render(model){
const currentStateName = model.active_states[0].name;
for (f in figmaNodes)
if (currentStateName === f)
return $("iframe",{src: figmaURL + figmaNodes[f], width: '100%', height: '100%'});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment