Comments (4)
Can you send a screencap video of what you're experiencing?
Btw, the spirit of the focal point feature was to pass the selection through to CSS for use with background-size: cover
. So it's kinda independent from your crop selection, which should output an image URL for a crop that has the same bounds as your choice in Decoy.
from decoy.
Clients could be creatures reigned by whatsoever logic, so, picture the following use case:
A client uploads a image for a marquee which has a 16/9 ratio and 1600x900 pixels on desktop. But the uploaded image has 3800x4200px. The client sets the focal point. In the template we have a ->crop(1600x900)->bkgd
. The returned image is cropped to the center of the original, losing the focal point reference (which is percentual to original image scale).
That's why we suggested methods that maintain the original ratio but resizes the image for bandwidth saving, etc.
We noticed that we can force aspect ratio in the image field... this kinda solves the "issue"...
from decoy.
Yeahhhhh, I see what you mean.
It's almost like two different types of coordinates:
- An x,y to center the crop around when cropped to an aspect ratio that is different than the source aspect ratio
- An x,y to passthrough to CSS to inform the
background-position
when usingcover
(which is the current implementation).
You are right that the forcing the aspect ratio kinda solves this, however, currently you can't force the user to use the crop tool and set an aspect ratio.
A way I would like to sovle for your use case is, when an aspect ratio is defined for image, automatically create a cropping bounds at the aspect ratio and don't allow the user to clear it. So if you specify an aspect, it is always applied as a crop. And it defaults to the center for the image.
Does that make sense? Thoughts?
from decoy.
Totally.
I was experimenting with this idea. The only problem I've found is that when resizing/moving the crop boundaries, the focal point could be left outside of it.
from decoy.
Related Issues (20)
- Changing date format throughout Decoy HOT 2
- Support Laravel 5.6 HOT 4
- Decoy Admin area not showing properly HOT 1
- Enabling Roles causes error exception HOT 6
- Call to undefined method Illuminate\Events\Dispatcher::fire() HOT 1
- Increment visual version numbers in sidebar with recently releases
- Vertical align the table actions
- Translations for fields
- Elements key is not declared in elements.yaml HOT 1
- Add CSV export support
- Searching for date and changing search field duplicates the date
- Don't write changes when admin remember_token changes HOT 1
- Upload svg in image field, "width cannot be null" HOT 2
- Changing element field type after it has been saved to DB
- Admin login not working on fresh install HOT 2
- wysiwyg editor trying to customise HOT 3
- Can't set Decoy locale() HOT 1
- Cannot Install decoy to fresh Laravel HOT 3
- Images + Files WYSIWYG editor HOT 1
- Do you need Filipino Translation for BKWLD?
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 decoy.