#Drawing placement with preview code
1 messages · Page 1 of 1 (latest)
It’s rad, I’m not complaining.
Okay, this is pretty awesome! Thank you. Out of curiosity, what did you need to edit in the class?
i basically copied the entire thing
then changed what it extended, Drawing instead of MeasuredTemplate
I removed some references to items
this.#events.resolve(canvas.scene.createEmbeddedDocuments("Drawing", [this.document.toObject()])); and that line had "MeasuredTemplate" and not "Drawing"
the fromData method was fromItem, so i changed that name
and removed item stuff there
that is basically it
you can compare both codes next to eachother
All right, didn’t seem to be too complicated, actually 😅
i left the rotate method in, but i dont think it does anything
it wasnt or i couldnt have done it
Don’t sell yourself short. I was just taking a quick look and thought it’s too complicated for what I’m doing, but you’ve just made it a 1000 times more awesome
so if you put this in a module or world script, all your macros can use it
if you global it
Yeah, I was actually thinking about making it a module
might need some tweaking on the data end
also atm it is snapped to the grid
all kinds of things you might want to change
I was just creating a way to quickly set up some sticky notes, and the more I work on it, the more I think it might be useful for others. With the preview, it might just be cool enough to share it.
In case I’ll actually make it a public module, how do you like to be credited?
the 5e system
the below code will do what you need. @spiral vigil
the data object is something you can change colors... stroke width etc
at the bottom of the code
((rotating currently doesnt seem to work with a circle/ellipse...
Thank you very much. I'll have a look at that.
And since I really only need circles, rotation isn't all that important to me 😄
ah uhm
then width and height is too much just widht for diameter would have been enough 😄
Oh, I think my modest knowledge is also sufficient for customizing finished macros. I can manage that 😉
there is still some comments in the class that are left overs from from dnd5e's extended template where i lifted the code from 😬
In fact, that would have been my plan if nobody had anything. So, just look at DnD.
yeah when in doubt 😄
see if they did it
oh i flubbed cancelling >.< never tested that
hmm seems cancel doesnt get interactionData... digs
improved code 🙂
also fixed the cancel problem ...