Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Richard Hamilton 79 posts 166 karma points
    Aug 23, 2017 @ 15:46
    Richard Hamilton
    0

    Using image cropper to create a focus for background image

    I am using the media picker to select an image for the background of an element.

    I like the way the image cropper works, so I would like to use the focal point of the crop determine the background-position of the background-image.

    ie, if they focus on the top right then : background-position: top right;

    Or maybe just use a grid of 9 radio buttons to represent the position? Has anyone ever done this?

  • Nigel Wilson 939 posts 2061 karma points
    Aug 28, 2017 @ 03:46
    Nigel Wilson
    0

    Hi Richard

    I have never done this but would it present issues if you use a focal point on the outer edge of the image and "run out" of image to display ? Or are you setting the image to cover the space.

    Otherwise, and just thinking out loud, is the focal point a pixel based value ? If so you could get that and do some simple maths with the image dimensions to get a percentage for placement.

    Again, just spit balling and probably way off track, but thought I'd share.

    Cheers, Nigel

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies