Guest User

Untitled

a guest
Jun 18th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. var currentName = 'foobar';
  2.  
  3. var dialog = new Dialog({
  4. title: 'Rename Layer',
  5. fields: {'Name': currentName}, // fields shown within the dialog. infers it's a "text" input autom.
  6. triggers: ['OK', 'Cancel'],
  7. onOK: function(fields) { // note the field access
  8. console.log(fields.name); // got a new name hopefully :)
  9. }
  10. });
Add Comment
Please, Sign In to add comment