react-design-editor icon indicating copy to clipboard operation
react-design-editor copied to clipboard

Rename Layer Names.

Open rushmedev opened this issue 2 years ago • 3 comments

  • There should be an option to rename layer names.
  • Users can individually rename each layer.

rushmedev avatar Aug 26 '22 18:08 rushmedev

This should work: editor.objects.update({name: updatedMame}, objectId)

chloe-bm avatar Aug 26 '22 18:08 chloe-bm

This should work: editor.objects.update({name: updatedMame}, objectId)

Okay, I will give it a try.

rushmedev avatar Aug 26 '22 19:08 rushmedev

Here you can see how we are handling updates:

https://github.com/layerhub-io/layerhub-io/blob/783f8ef53889647788e5f22b9cdacf19e0b6c9c5/packages/core/src/controllers/Objects.ts#L45

It will trigger a history:changed, and you can listen for it on: editor.on("history:changed")

Not sure if it will be needed to refresh the layers list

chloe-bm avatar Aug 26 '22 20:08 chloe-bm