Skip to content

options onStart, onEnd, onMove don't work #84

@czzplnm

Description

@czzplnm

I am following the examples here: https://zingchart.github.io/zingtouch/

And more specifically the pan example here: https://codepen.io/zingchart/pen/RRpyJY

But they don't even follow the docs, for example it is assigning the start function and then calling it within a custom function.


var startPan = customPan.start;

customPan.start = function(inputs) {
  var canvas = document.getElementById('main-canvas');
  var canvasRect = canvas.getBoundingClientRect();

  var x = inputs[0].current.x - canvasRect.left;
  var y = inputs[0].current.y - canvasRect.top;
  currentIndex = getIndex(x, y);
  if (currentIndex !== null) {
    bubbles[currentIndex].stopped = true;
  }

  return startPan.call(this, inputs);
}

Why is it doing it this way? Can you fix onStart, onEnd, onMove from the options object like the docs say?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions