Comments (13)
Thanks for reporting this! I'll look into this.
@bluej100 do you have an educated guess what's happening here? :)
from react-avatar-editor.
Thanks for responding very early π. I'm still digging in the code.
from react-avatar-editor.
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.
Maybe we could accept an allowBlankSpace option?
from react-avatar-editor.
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.
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.
Indeed, this is a valuable information π
from react-avatar-editor.
I edited my comment, if ever it helps. Thanks again π
from react-avatar-editor.
@srph can u checkout the master and test your use case?
from react-avatar-editor.
Alright thanks. I'll try it out π. I have been busy with work these days, sorry to be inactive π.
from react-avatar-editor.
No worries, I'm just back from vacation. Happy to get your feedback ;)
from react-avatar-editor.
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.
Not really. But there is an discussion ongoing in #55, you might want to take part :)
from react-avatar-editor.
Related Issues (20)
- getCroppingRect returning NaN HOT 2
- Creating equivalent DOM representation of editor crop [will pay $ for assistance]
- Not a perfect square
- TS2307: Cannot find module 'react-avatar-editor' or its corresponding type declarations. HOT 2
- How to make onImageChange fire when drag ends
- feature request: Provide a way to get the scaled image without refs
- Dependency warnings HOT 1
- Getting a console.error when using ref inside parent functional component HOT 1
- Change width and height parameter type from number to responsive value per react standard. HOT 1
- Security audit issue in v13.0.0 (@babel/traverse) HOT 4
- Just display part of it when using on the next.js instace and there is a scaling on Windows HOT 3
- Image dragging on canvas do not work on touch simulation in responsive mode in dev tools HOT 1
- Getting an error in the console about the showGrid property. HOT 1
- usage without typescript HOT 4
- With the new version 13.0.1 in production I'm getting "Cannot call a class as a function" HOT 2
- Could not find a declaration file for module 'react-avatar-editor'. 'C:/.../node_modules/react-avatar-editor/dist/index.js' implicitly has an 'any' type. HOT 2
- How to show Grid Lines? HOT 4
- [Question] How do you flip/mirror horizontally/vertically images?
- Loading images into the crop box
- Website down HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-avatar-editor.