another fix for resource persistence
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
parent
e1c684eaef
commit
4d414186c0
1 changed files with 4 additions and 2 deletions
|
@ -593,8 +593,10 @@ const selectTransformTool = () =>
|
|||
createResourceButton.onclick = () => {
|
||||
const image = document.createElement("img");
|
||||
image.src = state.selected.image.toDataURL();
|
||||
tools.stamp.state.addResource("Selection Resource", image);
|
||||
tools.stamp.enable();
|
||||
image.onload = () => {
|
||||
tools.stamp.state.addResource("Selection Resource", image);
|
||||
tools.stamp.enable();
|
||||
};
|
||||
};
|
||||
|
||||
actionArray.appendChild(saveSelectionButton);
|
||||
|
|
Loading…
Reference in a new issue