mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
regenerate seed on change of sloppiness (#1986)
This commit is contained in:
parent
818821c293
commit
fea257765d
3 changed files with 13 additions and 11 deletions
|
@ -21,6 +21,7 @@ import { t } from "../i18n";
|
|||
import { register } from "./register";
|
||||
import { newElementWith } from "../element/mutateElement";
|
||||
import { DEFAULT_FONT_SIZE, DEFAULT_FONT_FAMILY } from "../constants";
|
||||
import { randomInteger } from "../random";
|
||||
|
||||
const changeProperty = (
|
||||
elements: readonly ExcalidrawElement[],
|
||||
|
@ -199,6 +200,7 @@ export const actionChangeSloppiness = register({
|
|||
return {
|
||||
elements: changeProperty(elements, appState, (el) =>
|
||||
newElementWith(el, {
|
||||
seed: randomInteger(),
|
||||
roughness: value,
|
||||
}),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue