Regenerate roughjs shape only when the item is updated (#316)
* Regenerate roughjs shape only when the item is updated * Remove shape object during export and history undo/redo * Remove shape element during copying * Fix shape generation during creation
This commit is contained in:
committed by
Christopher Chedeau
parent
1bf18fe4ed
commit
74764b06eb
@ -1,5 +1,6 @@
|
||||
import { randomSeed } from "../random";
|
||||
import nanoid from "nanoid";
|
||||
import { Drawable } from "roughjs/bin/core";
|
||||
|
||||
export function newElement(
|
||||
type: string,
|
||||
@ -28,7 +29,8 @@ export function newElement(
|
||||
roughness,
|
||||
opacity,
|
||||
isSelected: false,
|
||||
seed: randomSeed()
|
||||
seed: randomSeed(),
|
||||
shape: null as Drawable | Drawable[] | null
|
||||
};
|
||||
return element;
|
||||
}
|
||||
|
Reference in New Issue
Block a user