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

angular-resizable-element

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-resizable-element - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.1.0"></a>
# [1.1.0](https://github.com/mattlewis92/angular-resizable-element/compare/v1.0.0...v1.1.0) (2017-05-12)
### Features
* add a class to the ghost element ([54be6b7](https://github.com/mattlewis92/angular-resizable-element/commit/54be6b7))
<a name="1.0.0"></a>

@@ -7,0 +17,0 @@ # [1.0.0](https://github.com/mattlewis92/angular-resizable-element/compare/v0.8.1...v1.0.0) (2017-03-24)

16

dist/esm/src/resizable.directive.d.ts

@@ -78,15 +78,15 @@ import { Renderer2, ElementRef, OnInit, AfterViewInit, EventEmitter, QueryList, OnDestroy, NgZone } from '@angular/core';

/**
* @private
* @hidden
*/
mouseup: Subject<any>;
/**
* @private
* @hidden
*/
mousedown: Subject<any>;
/**
* @private
* @hidden
*/
mousemove: Subject<any>;
/**
* @private
* @hidden
*/

@@ -97,15 +97,15 @@ resizeHandles: QueryList<ResizeHandle>;

/**
* @private
* @hidden
*/
constructor(renderer: Renderer2, elm: ElementRef, zone: NgZone);
/**
* @private
* @hidden
*/
ngOnInit(): void;
/**
* @private
* @hidden
*/
ngAfterViewInit(): void;
/**
* @private
* @hidden
*/

@@ -112,0 +112,0 @@ ngOnDestroy(): void;

@@ -15,56 +15,2 @@ import { Directive, Renderer2, ElementRef, Output, Input, EventEmitter, ContentChildren, NgZone } from '@angular/core';

import { ResizeHandle } from './resizeHandle.directive';
var PointerEventListeners = (function () {
function PointerEventListeners(renderer, zone) {
var _this = this;
zone.runOutsideAngular(function () {
_this.pointerDown = new Observable(function (observer) {
var unsubscribeMouseDown = renderer.listen('document', 'mousedown', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchStart = renderer.listen('document', 'touchstart', function (event) {
observer.next({ clientX: event.touches[0].clientX, clientY: event.touches[0].clientY, event: event });
});
return function () {
unsubscribeMouseDown();
unsubscribeTouchStart();
};
}).share();
_this.pointerMove = new Observable(function (observer) {
var unsubscribeMouseMove = renderer.listen('document', 'mousemove', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchMove = renderer.listen('document', 'touchmove', function (event) {
observer.next({ clientX: event.targetTouches[0].clientX, clientY: event.targetTouches[0].clientY, event: event });
});
return function () {
unsubscribeMouseMove();
unsubscribeTouchMove();
};
}).share();
_this.pointerUp = new Observable(function (observer) {
var unsubscribeMouseUp = renderer.listen('document', 'mouseup', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchEnd = renderer.listen('document', 'touchend', function (event) {
observer.next({ clientX: event.changedTouches[0].clientX, clientY: event.changedTouches[0].clientY, event: event });
});
var unsubscribeTouchCancel = renderer.listen('document', 'touchcancel', function (event) {
observer.next({ clientX: event.changedTouches[0].clientX, clientY: event.changedTouches[0].clientY, event: event });
});
return function () {
unsubscribeMouseUp();
unsubscribeTouchEnd();
unsubscribeTouchCancel();
};
}).share();
});
}
PointerEventListeners.getInstance = function (renderer, zone) {
if (!PointerEventListeners.instance) {
PointerEventListeners.instance = new PointerEventListeners(renderer, zone);
}
return PointerEventListeners.instance;
};
return PointerEventListeners;
}());
function isNumberCloseTo(value1, value2, precision) {

@@ -195,2 +141,3 @@ if (precision === void 0) { precision = 3; }

var RESIZE_BOTTOM_HOVER_CLASS = 'resize-bottom-hover';
var RESIZE_GHOST_ELEMENT_CLASS = 'resize-ghost-element';
export var MOUSE_MOVE_THROTTLE_MS = 50;

@@ -208,3 +155,3 @@ /**

/**
* @private
* @hidden
*/

@@ -254,11 +201,11 @@ function Resizable(renderer, elm, zone) {

/**
* @private
* @hidden
*/
this.mouseup = new Subject();
/**
* @private
* @hidden
*/
this.mousedown = new Subject();
/**
* @private
* @hidden
*/

@@ -270,3 +217,3 @@ this.mousemove = new Subject();

/**
* @private
* @hidden
*/

@@ -435,2 +382,3 @@ Resizable.prototype.ngOnInit = function () {

_this.renderer.setStyle(currentResize.clonedNode, 'cursor', getResizeCursor(currentResize.edges, resizeCursors));
_this.renderer.addClass(currentResize.clonedNode, RESIZE_GHOST_ELEMENT_CLASS);
}

@@ -463,3 +411,3 @@ _this.zone.run(function () {

/**
* @private
* @hidden
*/

@@ -473,3 +421,3 @@ Resizable.prototype.ngAfterViewInit = function () {

/**
* @private
* @hidden
*/

@@ -519,2 +467,56 @@ Resizable.prototype.ngOnDestroy = function () {

};
var PointerEventListeners = (function () {
function PointerEventListeners(renderer, zone) {
var _this = this;
zone.runOutsideAngular(function () {
_this.pointerDown = new Observable(function (observer) {
var unsubscribeMouseDown = renderer.listen('document', 'mousedown', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchStart = renderer.listen('document', 'touchstart', function (event) {
observer.next({ clientX: event.touches[0].clientX, clientY: event.touches[0].clientY, event: event });
});
return function () {
unsubscribeMouseDown();
unsubscribeTouchStart();
};
}).share();
_this.pointerMove = new Observable(function (observer) {
var unsubscribeMouseMove = renderer.listen('document', 'mousemove', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchMove = renderer.listen('document', 'touchmove', function (event) {
observer.next({ clientX: event.targetTouches[0].clientX, clientY: event.targetTouches[0].clientY, event: event });
});
return function () {
unsubscribeMouseMove();
unsubscribeTouchMove();
};
}).share();
_this.pointerUp = new Observable(function (observer) {
var unsubscribeMouseUp = renderer.listen('document', 'mouseup', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchEnd = renderer.listen('document', 'touchend', function (event) {
observer.next({ clientX: event.changedTouches[0].clientX, clientY: event.changedTouches[0].clientY, event: event });
});
var unsubscribeTouchCancel = renderer.listen('document', 'touchcancel', function (event) {
observer.next({ clientX: event.changedTouches[0].clientX, clientY: event.changedTouches[0].clientY, event: event });
});
return function () {
unsubscribeMouseUp();
unsubscribeTouchEnd();
unsubscribeTouchCancel();
};
}).share();
});
}
PointerEventListeners.getInstance = function (renderer, zone) {
if (!PointerEventListeners.instance) {
PointerEventListeners.instance = new PointerEventListeners(renderer, zone);
}
return PointerEventListeners.instance;
};
return PointerEventListeners;
}());
//# sourceMappingURL=resizable.directive.js.map

@@ -19,5 +19,5 @@ (function webpackUniversalModuleDefinition(root, factory) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/
/******/ }
/******/ // Create a new module (and put it into the cache)

@@ -227,56 +227,2 @@ /******/ var module = installedModules[moduleId] = {

var resizeHandle_directive_1 = __webpack_require__(0);
var PointerEventListeners = (function () {
function PointerEventListeners(renderer, zone) {
var _this = this;
zone.runOutsideAngular(function () {
_this.pointerDown = new Observable_1.Observable(function (observer) {
var unsubscribeMouseDown = renderer.listen('document', 'mousedown', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchStart = renderer.listen('document', 'touchstart', function (event) {
observer.next({ clientX: event.touches[0].clientX, clientY: event.touches[0].clientY, event: event });
});
return function () {
unsubscribeMouseDown();
unsubscribeTouchStart();
};
}).share();
_this.pointerMove = new Observable_1.Observable(function (observer) {
var unsubscribeMouseMove = renderer.listen('document', 'mousemove', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchMove = renderer.listen('document', 'touchmove', function (event) {
observer.next({ clientX: event.targetTouches[0].clientX, clientY: event.targetTouches[0].clientY, event: event });
});
return function () {
unsubscribeMouseMove();
unsubscribeTouchMove();
};
}).share();
_this.pointerUp = new Observable_1.Observable(function (observer) {
var unsubscribeMouseUp = renderer.listen('document', 'mouseup', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchEnd = renderer.listen('document', 'touchend', function (event) {
observer.next({ clientX: event.changedTouches[0].clientX, clientY: event.changedTouches[0].clientY, event: event });
});
var unsubscribeTouchCancel = renderer.listen('document', 'touchcancel', function (event) {
observer.next({ clientX: event.changedTouches[0].clientX, clientY: event.changedTouches[0].clientY, event: event });
});
return function () {
unsubscribeMouseUp();
unsubscribeTouchEnd();
unsubscribeTouchCancel();
};
}).share();
});
}
PointerEventListeners.getInstance = function (renderer, zone) {
if (!PointerEventListeners.instance) {
PointerEventListeners.instance = new PointerEventListeners(renderer, zone);
}
return PointerEventListeners.instance;
};
return PointerEventListeners;
}());
function isNumberCloseTo(value1, value2, precision) {

@@ -407,2 +353,3 @@ if (precision === void 0) { precision = 3; }

var RESIZE_BOTTOM_HOVER_CLASS = 'resize-bottom-hover';
var RESIZE_GHOST_ELEMENT_CLASS = 'resize-ghost-element';
exports.MOUSE_MOVE_THROTTLE_MS = 50;

@@ -420,3 +367,3 @@ /**

/**
* @private
* @hidden
*/

@@ -466,11 +413,11 @@ function Resizable(renderer, elm, zone) {

/**
* @private
* @hidden
*/
this.mouseup = new Subject_1.Subject();
/**
* @private
* @hidden
*/
this.mousedown = new Subject_1.Subject();
/**
* @private
* @hidden
*/

@@ -482,3 +429,3 @@ this.mousemove = new Subject_1.Subject();

/**
* @private
* @hidden
*/

@@ -647,2 +594,3 @@ Resizable.prototype.ngOnInit = function () {

_this.renderer.setStyle(currentResize.clonedNode, 'cursor', getResizeCursor(currentResize.edges, resizeCursors));
_this.renderer.addClass(currentResize.clonedNode, RESIZE_GHOST_ELEMENT_CLASS);
}

@@ -675,3 +623,3 @@ _this.zone.run(function () {

/**
* @private
* @hidden
*/

@@ -685,3 +633,3 @@ Resizable.prototype.ngAfterViewInit = function () {

/**
* @private
* @hidden
*/

@@ -759,2 +707,56 @@ Resizable.prototype.ngOnDestroy = function () {

exports.Resizable = Resizable;
var PointerEventListeners = (function () {
function PointerEventListeners(renderer, zone) {
var _this = this;
zone.runOutsideAngular(function () {
_this.pointerDown = new Observable_1.Observable(function (observer) {
var unsubscribeMouseDown = renderer.listen('document', 'mousedown', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchStart = renderer.listen('document', 'touchstart', function (event) {
observer.next({ clientX: event.touches[0].clientX, clientY: event.touches[0].clientY, event: event });
});
return function () {
unsubscribeMouseDown();
unsubscribeTouchStart();
};
}).share();
_this.pointerMove = new Observable_1.Observable(function (observer) {
var unsubscribeMouseMove = renderer.listen('document', 'mousemove', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchMove = renderer.listen('document', 'touchmove', function (event) {
observer.next({ clientX: event.targetTouches[0].clientX, clientY: event.targetTouches[0].clientY, event: event });
});
return function () {
unsubscribeMouseMove();
unsubscribeTouchMove();
};
}).share();
_this.pointerUp = new Observable_1.Observable(function (observer) {
var unsubscribeMouseUp = renderer.listen('document', 'mouseup', function (event) {
observer.next({ clientX: event.clientX, clientY: event.clientY, event: event });
});
var unsubscribeTouchEnd = renderer.listen('document', 'touchend', function (event) {
observer.next({ clientX: event.changedTouches[0].clientX, clientY: event.changedTouches[0].clientY, event: event });
});
var unsubscribeTouchCancel = renderer.listen('document', 'touchcancel', function (event) {
observer.next({ clientX: event.changedTouches[0].clientX, clientY: event.changedTouches[0].clientY, event: event });
});
return function () {
unsubscribeMouseUp();
unsubscribeTouchEnd();
unsubscribeTouchCancel();
};
}).share();
});
}
PointerEventListeners.getInstance = function (renderer, zone) {
if (!PointerEventListeners.instance) {
PointerEventListeners.instance = new PointerEventListeners(renderer, zone);
}
return PointerEventListeners.instance;
};
return PointerEventListeners;
}());

@@ -761,0 +763,0 @@

{
"name": "angular-resizable-element",
"version": "1.0.0",
"version": "1.1.0",
"description": "An angular 4.0+ directive that allows an element to be dragged and resized",

@@ -18,3 +18,3 @@ "main": "./dist/umd/angular-resizable-element.js",

"commit": "git-cz",
"compodoc": "compodoc -p tsconfig-compodoc.json -d docs -b /angular-resizable-element/docs/ --disableGraph --disableCoverage",
"compodoc": "compodoc -p tsconfig-compodoc.json -d docs --disableGraph --disableCoverage --disablePrivateOrInternalSupport",
"gh-pages": "git checkout gh-pages && git merge master --no-edit && npm run build:demo && npm run compodoc && git add . && git commit -m 'chore: build demo and docs' && git push && git checkout master",

@@ -50,5 +50,6 @@ "prerelease": "npm test",

"@angular/platform-browser-dynamic": "^4.0.0",
"@compodoc/compodoc": "^1.0.0-beta.8",
"@types/chai": "^3.4.33",
"@types/jasmine": "^2.5.46",
"@types/sinon": "^1.16.36",
"@types/sinon": "^2.2.1",
"@types/sinon-chai": "^2.7.27",

@@ -59,3 +60,2 @@ "@types/webpack": "^2.2.12",

"commitizen": "^2.8.1",
"compodoc": "^0.0.38",
"concurrently": "^3.1.0",

@@ -80,5 +80,5 @@ "core-js": "^2.4.1",

"ts-node": "^3.0.2",
"tslint": "^4.2.0",
"tslint": "^5.2.0",
"tslint-loader": "^3.3.0",
"typescript": "~2.2.1",
"typescript": "~2.3.2",
"validate-commit-msg": "^2.8.0",

@@ -85,0 +85,0 @@ "webpack": "^2.3.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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