Code Monkey home page Code Monkey logo

Comments (13)

mosch avatar mosch commented on June 9, 2024

Thanks for reporting this! I'll look into this.
@bluej100 do you have an educated guess what's happening here? :)

from react-avatar-editor.

srph avatar srph commented on June 9, 2024

Thanks for responding very early 🌟. I'm still digging in the code.

from react-avatar-editor.

bluej100 avatar bluej100 commented on June 9, 2024

Yeah, it's the BoundedX and Y methods trying to ensure that the selection isn't beyond the boundaries of the image, an impossible constraint here. I'm not sure what the correct behavior would be.

from react-avatar-editor.

bluej100 avatar bluej100 commented on June 9, 2024

Maybe we could accept an allowBlankSpace option?

from react-avatar-editor.

mosch avatar mosch commented on June 9, 2024

I think the best is to scale the image up to a minimum of the canvas size.
So scale=1 is should always fit the canvas size. I'll check what changes need to be made…

from react-avatar-editor.

srph avatar srph commented on June 9, 2024

It just happens that when I change the width and height I pass to ReactAvatarEditor (dynamically), the image doesn't resize to fit the canvas. Edit: Which is why I set the minimum scale to at least 0.5.

I'm not sure how to help out.

from react-avatar-editor.

mosch avatar mosch commented on June 9, 2024

Indeed, this is a valuable information πŸ‘

from react-avatar-editor.

srph avatar srph commented on June 9, 2024

I edited my comment, if ever it helps. Thanks again πŸ‘

from react-avatar-editor.

mosch avatar mosch commented on June 9, 2024

@srph can u checkout the master and test your use case?

from react-avatar-editor.

srph avatar srph commented on June 9, 2024

Alright thanks. I'll try it out πŸŽ‰. I have been busy with work these days, sorry to be inactive πŸ˜•.

from react-avatar-editor.

mosch avatar mosch commented on June 9, 2024

No worries, I'm just back from vacation. Happy to get your feedback ;)

from react-avatar-editor.

srph avatar srph commented on June 9, 2024

It's working. Another question, not sure if related: is there any way to move the image around the canvas if it has <1 scale?

from react-avatar-editor.

mosch avatar mosch commented on June 9, 2024

Not really. But there is an discussion ongoing in #55, you might want to take part :)

from react-avatar-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.