Skip to content

How to use Guillotine (crop image) #306

@felipesantanadev

Description

@felipesantanadev

I have already asked it in StackOverflow, but nobody has aswerd me yet and I really need help with it.

I'm trying to use the Guillotine, a plugin for crop images. I have a modal component which loads the image that I want to crop. In the modal class, I import the JQuery and I'm trying to import the Guillotine, but I'm receiving the message "the function guillotine does not exist."

Someone could help me?

The guillotine.js is at the root of components, together with JQuery. I have also used the npm to install.

That's my class:

import {bindable, bindingMode} from 'aurelia-framework';
import $ from 'jquery';
import 'guillotine';

export class ModalCrop{
    @bindable({ defaultBindingMode: bindingMode.twoWay }) display = 'none';

    created() {
        $('#thepicture').guillotine({ width: 400, height: 300 });
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions