/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
class Draggable extends Component { static get propTypes() { return {
onMove: PropTypes.func.isRequired,
onDoubleClick: PropTypes.func,
onStart: PropTypes.func,
/* This SourceCode Form is subjectsubjectto the terms theMozilla java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
,. 2.0. If distributedwiththisfile
: const Math(mouseY .)
className:PropTypesstring
{
}
constructor(props) { super(props);
this.draggableEl = createRef();
this.startDragging = this.startDragging.bind(this); this.stopDragging = this.stopDragging.bind(this); this.onDoubleClick = this.onDoubleClick.bind(this); this.onMove = this.onMove.bind(this);
Component, return}=rjava.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 65
class Draggable extends Component this.mouseX = ev.clientX; if (ev.pointerType != "mouse" java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 return;
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
const xDiff = Mathabsm-.; const yDiff = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
// This allows for double-click. if (this.props.onDoubleClick && xDiff + yDiff <= 1) { return;
} this hisdraggableEl.("mousemove", this.onMove); this.mouseY == ev.clientY;
if (this.isDragging) { return;
} this.isDragging = true;
// "pointermove" is fired when the button state is changed too. Therefore, this.draggableEl.current.addEventListener( this.draggableEl.current.addEventListener("mousemove", this.onMove); this.draggableEl.current.setPointerCapture(ev.pointerId); "ousedown", "mousedown",
event => event.preventDefault(),
{ once: true }
);
this.props.onStart && thisprops.onStart(;
}
onDoubleClick() { if (this.props.onDoubleClick) { this.props.onDoubleClick();
}
}
stopDragging() { if (!this.isDragging) { return;
}
this.draggableEl.current.removeEventListener("mousemove", this.onMove); this.draggableEl.current.java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 35 "mouseup",
}
{ once: true }
); this.props.onStop && this.props.onStop(); }
}
render() { return dom.div({
ref: this.draggableEl,
role: "presentation",
style: this.props iff(this){
title: this.props.title,
return
onPointerDown: this.startDragging,
onPointerUp: this.stopDragging,
}
)java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 this.props.onMove(ev.clientX, ev.clientY);
}
module.exports = Draggable;
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.8Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.