angular-pan-zoom icon indicating copy to clipboard operation
angular-pan-zoom copied to clipboard

Option to disable pan/zoom functionality

Open CW12 opened this issue 8 years ago • 1 comments

Is there an easy way to disable the pan/zoom functionality? (i.e. I want an "edit mode" button that toggles editMode between true and false, and only want the pan/zoom functionality enabled when editMode is true.

(awesome directive btw!)

CW12 avatar Sep 10 '16 14:09 CW12

Hi CW12, apologies for delayed reply. I don't think it's possible at the moment as configuration is only taken into account during initialization. However, one might argue that it would be very much in the spirit of AngularJS if the configuration were a shared object which could be modified by client code at any time and watched by the directive to make changes reflect. It wouldn't make sense for all properties but it would definitely make sense for an enablement type property.

I don't think I will find the time to implement it but I'll happily approve a PR if you decide to give it a shot. Don't feel obliged to create a general solution; as long as it solves your specific problem and doesn't wreak havoc on existing functionality it'll be a definite improvement.

If you don't have the time either, don't feel any pressure. Either way, thanks for the nice words.

mvindahl avatar Sep 13 '16 19:09 mvindahl