ui-cropper icon indicating copy to clipboard operation
ui-cropper copied to clipboard

Allow propagation

Open ViieeS opened this issue 6 years ago • 5 comments

I try to use uiCropper and ui.bootstrap.contextMenu together.

<div context-menu="$ctrl.contextMenu">
        <ui-cropper
                image="$ctrl.image"
                result-image-format="image/jpeg"
                area-type="rectangle"
                init-max-area="true"
        ></ui-cropper>
</div>

The problem is after menu opened it doesn't close with left or right click because of this line: https://github.com/CrackerakiUA/ui-cropper/blob/9c26040c2ed1b4a80f1cfc7195058a9d2ae4b498/compile/unminified/ui-cropper.js#L2507

@CrackerakiUA, can you please explain why we use it here? Maybe we can allow event propagation optionally?

ViieeS avatar Oct 29 '18 09:10 ViieeS

we need it there, try to handle bootstrap click above ui-cropper

CrackerakiUA avatar Oct 29 '18 10:10 CrackerakiUA

if you can't handle, you can add option to disable it, so by default it should be enabled. PR are welcome, just update also docs

CrackerakiUA avatar Oct 29 '18 10:10 CrackerakiUA

@CrackerakiUA I've created PR, but I didn't get where to update the docs. I've added description to PR.

ViieeS avatar Nov 02 '18 07:11 ViieeS

https://github.com/CrackerakiUA/ui-cropper/wiki

CrackerakiUA avatar Nov 02 '18 14:11 CrackerakiUA

@CrackerakiUA actually it's not clear for me how to create PR on the wiki. I've create a new repo and made changes here: https://github.com/ViieeS/ui-cropper-wiki.

Also, please make npm publish the latest version of ui-cropper. Thanks.

ViieeS avatar Nov 03 '18 03:11 ViieeS