Lines Matching refs:options

200   var SvgPanZoom = function(svg, options) {
201 this.init(svg, options)
220 SvgPanZoom.prototype.init = function(svg, options) {
224 this.options = Utils.extend(Utils.extend({}, optionsDefaults), options)
244 if (this.options.controlIconsEnabled && this.options.zoomEnabled) {
272 if (this.options.fit) {
297 if (this.options.center) {
397 if (!this.options.zoomEnabled) {
430 …, zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 s…
446 if (Utils.isFunction(this.options.beforeZoom)) {
447 this.options.beforeZoom()
462 if (setZoom.a < this.options.minZoom * this.initialCTM.a) {setZoom.a = setZoom.d = wasZoom.a}
463 if (setZoom.a > this.options.maxZoom * this.initialCTM.a) {setZoom.a = setZoom.d = wasZoom.a}
477 if (this.options.onZoom) {
478 this.options.onZoom(setZoom.a)
533 if (this.state === 'pan' && this.options.panEnabled) {
535 if (Utils.isFunction(this.options.beforePan)) {
536 this.options.beforePan()
550 this.options.onPan(this._pan.x, this._pan.y)
551 } else if (this.state === 'drag' && this.options.dragEnabled) {
578 if (this.options.controlIconsEnabled) {
588 … zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed
591 zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2
617 …if (evt.target.tagName === 'svg' || !this.options.dragEnabled) { // Pan anyway when drag is disabl…
691 if (Utils.isFunction(this.options.beforePan)) {
692 this.options.beforePan()
705 this.options.onPan(this._pan.x, this._pan.y)
715 if (Utils.isFunction(this.options.beforePan)) {
716 this.options.beforePan()
729 this.options.onPan(this._pan.x, this._pan.y)
753 enablePan: function() {that.options.panEnabled = true}
754 , disablePan: function() {that.options.panEnabled = false}
755 , isPanEnabled: function() {return !!that.options.panEnabled}
760 , setBeforePan: function(fn) {that.options.beforePan = Utils.proxy(fn, that.publicInstance)}
761 , setOnPan: function(fn) {that.options.onPan = Utils.proxy(fn, that.publicInstance)}
763 , enableDrag: function() {that.options.dragEnabled = true}
764 , disableDrag: function() {that.options.dragEnabled = false}
765 , isDragEnabled: function() {return !!that.options.dragEnabled}
768 if (that.options.controlIconsEnabled && !that.options.zoomEnabled) {
771 that.options.zoomEnabled = true;
774 if (that.options.controlIconsEnabled && that.options.zoomEnabled) {
777 that.options.zoomEnabled = false;
779 , isZoomEnabled: function() {return !!that.options.zoomEnabled}
781 if (that.options.zoomEnabled && !that.options.controlIconsEnabled) {
782 that.options.controlIconsEnabled = true
787 if (that.options.controlIconsEnabled) {
788 that.options.controlIconsEnabled = false;
792 , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled}
794 , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale}
795 , setMinZoom: function(zoom) {that.options.minZoom = zoom}
796 , setMaxZoom: function(zoom) {that.options.maxZoom = zoom}
798 , setBeforeZoom: function(fn) {that.options.beforeZoom = Utils.proxy(fn, that.publicInstance)}
799 , setOnZoom: function(fn) {that.options.onZoom = Utils.proxy(fn, that.publicInstance)}
814 this.zoomBy(1 + that.options.zoomScaleSensitivity)
817 this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity))
837 window.svgPanZoom = function(elementOrSelector, options){
853 , instance: new SvgPanZoom(svg, options)