DrawerJs icon indicating copy to clipboard operation
DrawerJs copied to clipboard

Continue using the last tool.

Open ar0ra1 opened this issue 4 years ago • 1 comments

I have a canvas that requires, the person to draw a rectangle multiple times. Each time the person has to re-select the Rectangle Shape from the toolbar. Is there a way to keep using the Rectangle tool after creating a single instance ?

For default config, I have this

defaultActivePlugin: {
		name: 'Rectangle',
		mode: 'lastUsed'
	}

but this is for init only.

ar0ra1 avatar Apr 07 '20 03:04 ar0ra1

As far as I can tell using the API / Configuration options: No

Using the Code: Partially I tried adding this (the code for deactivating the tool is here: https://github.com/carstenschaefer/DrawerJs/blob/8dd40abe890901e906792e8a104fddbe8c0be8c9/src/plugins/BaseShape.js#L211) but just ignoring the deactivating gives error messages. So you will probably need to deactivate the tool and then reactivate it. But I did not test this assumption.

extremeCrazyCoder avatar Apr 07 '20 19:04 extremeCrazyCoder