Copied to clipboard

Flag this post as spam?

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


  • Mitton 22 posts 71 karma points c-trib
    Feb 22, 2016 @ 06:07
    Mitton
    0

    ImageCropper in a custom view

    I'm trying to use the Image Cropper in a custom view. The object is initially created in the controller like this:

    $scope.myCrop= {
        view: "imagecropper",
        config: {
            crops: [
                {
                    alias: "128x128",
                    height: 128,
                    width:128
                }
            ],
            focalpoint: {
                left: 0.5,
                top:0.5
            },
            src:""
        }
    }
    

    In the view I display it like this.

                <umb-property property="myCrop">
                    <umb-editor model="myCrop"></umb-editor>
                </umb-property>
    

    That allows me to pick an image from the file system and crop it, but I can't seem to get the image data in the scope so I can do something with it, like post it to an API or something.

    The image data is available in the child scope, in the ImageCropperController. How do I get it from that scope into my main scope?

Please Sign in or register to post replies

Write your reply to:

Draft