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

[Bug]: Change options for Cropper #5847

Closed
drma-tech opened this issue Nov 17, 2024 · 12 comments
Closed

[Bug]: Change options for Cropper #5847

drma-tech opened this issue Nov 17, 2024 · 12 comments
Assignees
Labels
Type: Bug 🐞 Something isn't working
Milestone

Comments

@drma-tech
Copy link

Blazorise Version

all

What Blazorise provider are you running on?

None

Link to minimal reproduction or a simple code snippet

I can't set any configuration. If I try just one, the page gives an error when running. If I try more than one, I get this error.

Image

Steps to reproduce & bug description

any attempt to define options.

What is expected?

can set one or more options.

What is actually happening?

Image
I don't know if this is the reason (as I don't know the behavior of the record), but the options structure is a record and the properties are set to init.

What browsers do you see the problem on?

No response

Any additional comments?

ImageOptions, SelectionOptions, GridOptions

all have the same problem

@drma-tech drma-tech added the Type: Bug 🐞 Something isn't working label Nov 17, 2024
@stsrki
Copy link
Collaborator

stsrki commented Nov 17, 2024

It looks like there is something wrong with Visual Studio IntelliSense. Can you try restarting it?

@drma-tech
Copy link
Author

drma-tech commented Nov 17, 2024

It's not Visual Studio. I can't even compile.

Image

And if I use just one attribute, I get this error:

Image

@stsrki
Copy link
Collaborator

stsrki commented Nov 17, 2024

Replace this
Image

with ,

@drma-tech
Copy link
Author

drma-tech commented Nov 17, 2024

ok, this work. but

still doesnt work on browser (SetParametersAsync - just where it gets the options)

Image

@drma-tech
Copy link
Author

Taking advantage of the cropper subject, when I'm starting and still don't have an image, it looks like this:

Image

@stsrki stsrki added this to the 1.7 support milestone Nov 19, 2024
@stsrki stsrki added this to Support Nov 19, 2024
@github-project-automation github-project-automation bot moved this to 🔙 Backlog in Support Nov 19, 2024
@stsrki stsrki closed this as completed Dec 30, 2024
@github-project-automation github-project-automation bot moved this from 🔙 Backlog to ✔ Done in Support Dec 30, 2024
@drma-tech
Copy link
Author

@stsrki SetParametersAsync was resolved also?

@stsrki
Copy link
Collaborator

stsrki commented Dec 30, 2024

The same fix is handled for load and update of image so it should work for SetParametersAsync also.

@drma-tech
Copy link
Author

They are two different things, even though I put both of them here. But I will test them as soon as they come out.

@drma-tech
Copy link
Author

drma-tech commented Feb 26, 2025

Image

Image

@stsrki I tested it today (better late than never). It still doesn't work.

@drma-tech
Copy link
Author

also (and yet), when i use the option, i got errrors

 <Cropper @ref="cropper" Source="@OriginalPicture" SelectionChanged="@OnSelectionChanged" Style="width: 256px; height: 256px;"
          SelectionOptions="@(new CropperSelectionOptions{Zoomable=false, AspectRatio=CropperAspectRatio.Is2x3})" />

Image

@stsrki
Copy link
Collaborator

stsrki commented Feb 27, 2025

@tesar-tech

@tesar-tech
Copy link
Collaborator

The first issue is an error indicating that the source is either unreachable or does not exist. This originates from Cropper.js.
It is the developer's responsibility to ensure that the source is valid. If it is not, Blazorise will not fail; instead, it will trigger the ImageLoadingFailed event, as described here: #5937 (this should be available in the next version).

We could potentially hide the error, but I don’t think that would be a good idea and from your perspective nothing will change.

For the second one - yes, that seems like another issue. Can you create new ticket for it? so we don't mix the conversations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐞 Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants