We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding ability to rotate points with image like other types of point.
It will be possible to ...
In drawPoint, change
if (style && typeof style === 'object') { type = style.toString(); if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') { ctx.drawImage(style, x - style.width / 2, y - style.height / 2, style.width, style.height); return; } }
to
if (style && typeof style === 'object') { type = style.toString(); if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') { ctx.save(); ctx.translate(x, y); ctx.rotate(rotation * Math.PI / 180); ctx.drawImage(style, -1 * style.width / 2, -1 * style.height / 2, style.width, style.height); ctx.restore(); return; } }
The text was updated successfully, but these errors were encountered:
I think this is a good enhancement. Do you want to create a PR for this (including unit tests)?
Sorry, something went wrong.
Like this? https://jsfiddle.net/nyammy/vx8cd9w4/3/
Successfully merging a pull request may close this issue.
Feature Proposal
Adding ability to rotate points with image like other types of point.
Feature Use Case
It will be possible to ...
Possible Implementation
In drawPoint, change
to
The text was updated successfully, but these errors were encountered: