Maik Schürer wrote:
1) ist it possible to change e.g. the grop/zoom mouse action in JSVGCanvas
from "Ctrl+left" mouse to "left mouse" ?
2) ist it possible to deactivate e.g. the rotate mouse action in JSVGCanvas
("Ctrl+right" mouse)

Here's what we do (abridged for clarity :-). We just want pan and zoom, using button1 and shift-button1, respectively...

        // Disable default interactors
        svgCanvas.setEnableImageZoomInteractor(false);
        svgCanvas.setEnablePanInteractor(false);
        svgCanvas.setEnableResetTransformInteractor(false);
        svgCanvas.setEnableRotateInteractor(false);
        svgCanvas.setEnableZoomInteractor(false);

        // Add my pan and zoom interactors
        svgCanvas.getInteractors().add(new PanInteractor());
        svgCanvas.getInteractors().add(new ZoomInteractor());

...

    class PanInteractor extends AbstractPanInteractor {
        public boolean startInteraction(InputEvent ie) {
            if (!(ie instanceof MouseEvent))
                return false;
            MouseEvent me = (MouseEvent)ie;
            return me.getID() == MouseEvent.MOUSE_PRESSED
              && (me.getModifiersEx() & MouseEvent.SHIFT_DOWN_MASK) == 0
              && me.getButton() == MouseEvent.BUTTON1;
        }
    }

Our custom ZoomInteractor is similar.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to