Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dresscode-bricks

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dresscode-bricks - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

22

lib/Bricks/DragController.js

@@ -20,2 +20,3 @@ //#require Bricks.Component

this._lastPos = null;
this._dragMode = false;

@@ -35,12 +36,14 @@ var eventName = 'mousedown';

$$_onMouseDown: function(evt) {
var isTouch = evt.type == 'touchstart';
this._lastPos = Bricks.Event.getPos(evt);
if (isTouch && evt.touches.length > 1) {
return;
if (!this._dragMode) {
var isTouch = evt.type === 'touchstart';
this._lastPos = Bricks.Event.getPos(evt);
if (!isTouch || evt.touches.length === 1) {
if (this._fireEvent('start', {event: evt})) {
this._dragMode = true;
this._events.on(this._doc, isTouch ? 'touchmove' : 'mousemove', this.$$_onMouseMove, this);
this._events.on(this._doc, isTouch ? 'touchend' : 'mouseup', this.$$_onMouseUp, this);
Bricks.Event.stop(evt);
}
}
}
if (this._fireEvent('start', {event: evt})) {
this._events.on(this._doc, isTouch ? 'touchmove' : 'mousemove', this.$$_onMouseMove, this);
this._events.on(this._doc, isTouch ? 'touchend' : 'mouseup', this.$$_onMouseUp, this);
Bricks.Event.stop(evt);
}
},

@@ -62,2 +65,3 @@

this._fireEvent('end', {event: evt});
this._dragMode = false;
this._events.un(this._doc, 'mousemove,touchmove', this.$$_onMouseMove, this);

@@ -64,0 +68,0 @@ this._events.un(this._doc, 'mouseup,touchend', this.$$_onMouseUp, this);

{
"name": "dresscode-bricks",
"version": "0.1.6",
"version": "0.1.7",
"author": {

@@ -5,0 +5,0 @@ "name": "Kolyaj",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc