Skip to content
New issue

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

Failed in canvas #37

Closed
dongzhonghua opened this issue Jan 16, 2024 · 6 comments
Closed

Failed in canvas #37

dongzhonghua opened this issue Jan 16, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@dongzhonghua
Copy link

obsidian version: v1.5.3
platform: mac

failed on canvas file

@dongzhonghua dongzhonghua changed the title Failed on canvas Failed in canvas Jan 16, 2024
@nicojeske nicojeske added the enhancement New feature or request label Feb 26, 2024
@nicojeske
Copy link
Owner

This is currently not supported and I currently do not have the resources to implement it. I will leave the issue open in the case someone wants to work on it.

@Mideks
Copy link
Contributor

Mideks commented Feb 28, 2024

@nicojeske
I seem to have misunderstood the nature of these problems..... I just realised that I may have been referring to the canvas embedded md files, where you can't resize the picture while on the canvas.

But I originally understood this problem as "there are pictures on the canvas and you can't resize them with the wheel like in md files"
Lol, and, I almost implemented that feature before I realised it might not be exactly what was meant.

Do you think my implementation is appropriate in your plugin?

@nicojeske
Copy link
Owner

I am also not sure what behaviour @dongzhonghua means. But currently both, zooming a directly embedded image in a canvas and zooming an image embedded in an md file that is embedded in the canvas, are not implemented.

Feel free to work on any of those two features if you want to, I will gladly merge your PR if you find a way to implement this.

@Mideks
Copy link
Contributor

Mideks commented Feb 28, 2024

@nicojeske
In fact, I've been working on this feature for two days now, and I think I've managed to finish it by 70%. I've found a way to directly resize the nodes on the canvas, and I'm testing the work now and finalising the scaling logic while preserving the proportions...

By the way, do you think resizing should only work for pictures, or for any type of node, like videos, sounds, pdf, texts or even md files?

@Mideks
Copy link
Contributor

Mideks commented Feb 28, 2024

By the way, I opened #47 for the reason that it will not be possible to use Shift (because of horizontal scrolling) and Ctrl (because of canvas zooming) modifiers normally on canvas. So maybe it would be a good idea to enable scroll lock only when the cursor is over an element? (something like hover event)

Mideks added a commit to Mideks/mousewheel-image-zoom that referenced this issue Mar 1, 2024
- Enable proportional scaling of all media attachments (images, videos, audio, PDFs), text blocks, and even Markdown files on the canvas using modifier key + mouse wheel, provided that these elements are not selected or focused for editing.
- Introduce the ability to undo node scaling via ctrl+z, as if you were undoing the scaling action performed with the mouse.

Note: Due to ongoing issue nicojeske#47, normal scaling is temporarily restricted to use with the Alt key.

Related to: nicojeske#37
@nicojeske
Copy link
Owner

Implemented as of #48 in 1.0.22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants