Skip to content

jcrop.newCropper is not a function #304

@nunoperalta

Description

@nunoperalta

In these examples:

https://jcrop.com/guide/widgets.html#creating-a-widget
https://jcrop.com/guide/instance.html#newwidget-rect-options

const jcrop = Jcrop.attach('target');
const rect = Jcrop.Rect.fromPoints([100,100],[200,200]);
jcrop.newCropper(rect,{ aspectRatio: rect.aspect });

TypeError: jcrop.newCropper is not a function

I'm finding it really hard to get this working, and unfortunately the documentation is very confusing or incomplete.
(eventually got this figured out)

Would be nice if the page at: https://jcrop.com/examples/
could have an example source code that I could copy from, as it seems to do exactly what I want.

I'm simply looking to put a default cropper active, centered to the image, with fixed aspect ratio.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions