noVNC coding style

This commit is contained in:
Lucas Raby 2018-06-19 16:47:30 +02:00
parent 8b58970823
commit b541aea4cd
1 changed files with 5 additions and 5 deletions

View File

@ -207,13 +207,13 @@ Mouse.prototype = {
}, },
_handleMouseMove: function (e) { _handleMouseMove: function (e) {
this._handlePinchZoom(e);
this._updateMousePosition(e); this._updateMousePosition(e);
this._handle_pinch_zoom(e);
this.onmousemove(this._pos.x, this._pos.y); this.onmousemove(this._pos.x, this._pos.y);
stopEvent(e); stopEvent(e);
}, },
_handle_pinch_zoom (e) { _handlePinchZoom: function (e) {
if(e.targetTouches) { if(e.targetTouches) {
if (e.targetTouches.length == 2 && e.changedTouches.length == 2) { if (e.targetTouches.length == 2 && e.changedTouches.length == 2) {
// Check if the two target touches are the same ones that started // Check if the two target touches are the same ones that started
@ -226,9 +226,9 @@ Mouse.prototype = {
if (point1 >= 0 && point2 >= 0) { if (point1 >= 0 && point2 >= 0) {
var tpDist = Math.abs(e.targetTouches[0].clientX - e.targetTouches[1].clientX); var tpDist = Math.abs(e.targetTouches[0].clientX - e.targetTouches[1].clientX);
if (tpTreshold == null) if (tpTreshold == null) {
tpTreshold = tpDist; tpTreshold = tpDist;
}
this._accumulatedWheelDeltaY = tpTreshold - tpDist; this._accumulatedWheelDeltaY = tpTreshold - tpDist;
if (Math.abs(this._accumulatedWheelDeltaY) > WHEEL_STEP) { if (Math.abs(this._accumulatedWheelDeltaY) > WHEEL_STEP) {
this._generateWheelStepY(); this._generateWheelStepY();
@ -323,4 +323,4 @@ Mouse.prototype = {
c.removeEventListener('contextmenu', this._eventHandlers.mousedisable); c.removeEventListener('contextmenu', this._eventHandlers.mousedisable);
} }
}; };