angular-gridster2
Advanced tools
Comparing version 2.6.1 to 2.7.0
@@ -321,3 +321,3 @@ "use strict"; | ||
template: '<ng-content></ng-content><gridster-preview></gridster-preview>', | ||
styles: [":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; -webkit-user-select: none; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) /deep/ gridster-item { position: relative; } :host gridster-preview { background: rgba(0, 0, 0, 0.15); position: absolute; }"] | ||
styles: [":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) /deep/ gridster-item { position: relative; } :host gridster-preview { background: rgba(0, 0, 0, 0.15); position: absolute; }"] | ||
},] }, | ||
@@ -324,0 +324,0 @@ ]; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"GridsterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster","template":"<ng-content></ng-content><gridster-preview></gridster-preview>","styles":[":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; -webkit-user-select: none; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) /deep/ gridster-item { position: relative; } :host gridster-preview { background: rgba(0, 0, 0, 0.15); position: absolute; }"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}],"optionsChanged":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method"}],"detectScrollBar":[{"__symbolic":"method"}],"setGridSize":[{"__symbolic":"method"}],"setGridDimensions":[{"__symbolic":"method"}],"calculateLayout":[{"__symbolic":"method"}],"addItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"checkCollision":[{"__symbolic":"method"}],"findItemWithItem":[{"__symbolic":"method"}],"autoPositionItem":[{"__symbolic":"method"}],"pixelsToPosition":[{"__symbolic":"method"}],"positionXToPixels":[{"__symbolic":"method"}],"positionYToPixels":[{"__symbolic":"method"}],"checkCompactUp":[{"__symbolic":"method"}],"moveUpTillCollision":[{"__symbolic":"method"}],"checkCompactLeft":[{"__symbolic":"method"}],"moveLeftTillCollision":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster","template":"<ng-content></ng-content><gridster-preview></gridster-preview>","styles":[":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; -webkit-user-select: none; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) /deep/ gridster-item { position: relative; } :host gridster-preview { background: rgba(0, 0, 0, 0.15); position: absolute; }"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}],"optionsChanged":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method"}],"detectScrollBar":[{"__symbolic":"method"}],"setGridSize":[{"__symbolic":"method"}],"setGridDimensions":[{"__symbolic":"method"}],"calculateLayout":[{"__symbolic":"method"}],"addItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"checkCollision":[{"__symbolic":"method"}],"findItemWithItem":[{"__symbolic":"method"}],"autoPositionItem":[{"__symbolic":"method"}],"pixelsToPosition":[{"__symbolic":"method"}],"positionXToPixels":[{"__symbolic":"method"}],"positionYToPixels":[{"__symbolic":"method"}],"checkCompactUp":[{"__symbolic":"method"}],"moveUpTillCollision":[{"__symbolic":"method"}],"checkCompactLeft":[{"__symbolic":"method"}],"moveLeftTillCollision":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"GridsterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster","template":"<ng-content></ng-content><gridster-preview></gridster-preview>","styles":[":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) /deep/ gridster-item { position: relative; } :host gridster-preview { background: rgba(0, 0, 0, 0.15); position: absolute; }"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}],"optionsChanged":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method"}],"detectScrollBar":[{"__symbolic":"method"}],"setGridSize":[{"__symbolic":"method"}],"setGridDimensions":[{"__symbolic":"method"}],"calculateLayout":[{"__symbolic":"method"}],"addItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"checkCollision":[{"__symbolic":"method"}],"findItemWithItem":[{"__symbolic":"method"}],"autoPositionItem":[{"__symbolic":"method"}],"pixelsToPosition":[{"__symbolic":"method"}],"positionXToPixels":[{"__symbolic":"method"}],"positionYToPixels":[{"__symbolic":"method"}],"checkCompactUp":[{"__symbolic":"method"}],"moveUpTillCollision":[{"__symbolic":"method"}],"checkCompactLeft":[{"__symbolic":"method"}],"moveLeftTillCollision":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster","template":"<ng-content></ng-content><gridster-preview></gridster-preview>","styles":[":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) /deep/ gridster-item { position: relative; } :host gridster-preview { background: rgba(0, 0, 0, 0.15); position: absolute; }"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}],"optionsChanged":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method"}],"detectScrollBar":[{"__symbolic":"method"}],"setGridSize":[{"__symbolic":"method"}],"setGridDimensions":[{"__symbolic":"method"}],"calculateLayout":[{"__symbolic":"method"}],"addItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"checkCollision":[{"__symbolic":"method"}],"findItemWithItem":[{"__symbolic":"method"}],"autoPositionItem":[{"__symbolic":"method"}],"pixelsToPosition":[{"__symbolic":"method"}],"positionXToPixels":[{"__symbolic":"method"}],"positionYToPixels":[{"__symbolic":"method"}],"checkCompactUp":[{"__symbolic":"method"}],"moveUpTillCollision":[{"__symbolic":"method"}],"checkCompactLeft":[{"__symbolic":"method"}],"moveLeftTillCollision":[{"__symbolic":"method"}]}}}}] |
@@ -31,2 +31,3 @@ "use strict"; | ||
enabled: false, | ||
ignoreContentClass: 'gridster-item-content', | ||
stop: undefined // callback when dragging an item stops. Accepts Promise return to cancel/approve drag. | ||
@@ -33,0 +34,0 @@ // Arguments: item, gridsterItem, event |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"GridsterConfigService":{"gridType":"fit","fixedColWidth":250,"fixedRowHeight":250,"compactUp":false,"compactLeft":false,"mobileBreakpoint":640,"minCols":1,"maxCols":100,"minRows":1,"maxRows":100,"defaultItemCols":1,"defaultItemRows":1,"maxItemCols":50,"maxItemRows":50,"minItemCols":1,"minItemRows":1,"margin":10,"outerMargin":true,"scrollSensitivity":10,"scrollSpeed":20,"itemChangeCallback":{"__symbolic":"reference","name":"undefined"},"itemResizeCallback":{"__symbolic":"reference","name":"undefined"},"draggable":{"enabled":false,"stop":{"__symbolic":"reference","name":"undefined"}},"resizable":{"enabled":false,"handles":{"s":true,"e":true,"n":true,"w":true,"se":true,"ne":true,"sw":true,"nw":true},"stop":{"__symbolic":"reference","name":"undefined"}},"swap":true}}},{"__symbolic":"module","version":1,"metadata":{"GridsterConfigService":{"gridType":"fit","fixedColWidth":250,"fixedRowHeight":250,"compactUp":false,"compactLeft":false,"mobileBreakpoint":640,"minCols":1,"maxCols":100,"minRows":1,"maxRows":100,"defaultItemCols":1,"defaultItemRows":1,"maxItemCols":50,"maxItemRows":50,"minItemCols":1,"minItemRows":1,"margin":10,"outerMargin":true,"scrollSensitivity":10,"scrollSpeed":20,"itemChangeCallback":{"__symbolic":"reference","name":"undefined"},"itemResizeCallback":{"__symbolic":"reference","name":"undefined"},"draggable":{"enabled":false,"stop":{"__symbolic":"reference","name":"undefined"}},"resizable":{"enabled":false,"handles":{"s":true,"e":true,"n":true,"w":true,"se":true,"ne":true,"sw":true,"nw":true},"stop":{"__symbolic":"reference","name":"undefined"}},"swap":true}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"GridsterConfigService":{"gridType":"fit","fixedColWidth":250,"fixedRowHeight":250,"compactUp":false,"compactLeft":false,"mobileBreakpoint":640,"minCols":1,"maxCols":100,"minRows":1,"maxRows":100,"defaultItemCols":1,"defaultItemRows":1,"maxItemCols":50,"maxItemRows":50,"minItemCols":1,"minItemRows":1,"margin":10,"outerMargin":true,"scrollSensitivity":10,"scrollSpeed":20,"itemChangeCallback":{"__symbolic":"reference","name":"undefined"},"itemResizeCallback":{"__symbolic":"reference","name":"undefined"},"draggable":{"enabled":false,"ignoreContentClass":"gridster-item-content","stop":{"__symbolic":"reference","name":"undefined"}},"resizable":{"enabled":false,"handles":{"s":true,"e":true,"n":true,"w":true,"se":true,"ne":true,"sw":true,"nw":true},"stop":{"__symbolic":"reference","name":"undefined"}},"swap":true}}},{"__symbolic":"module","version":1,"metadata":{"GridsterConfigService":{"gridType":"fit","fixedColWidth":250,"fixedRowHeight":250,"compactUp":false,"compactLeft":false,"mobileBreakpoint":640,"minCols":1,"maxCols":100,"minRows":1,"maxRows":100,"defaultItemCols":1,"defaultItemRows":1,"maxItemCols":50,"maxItemRows":50,"minItemCols":1,"minItemRows":1,"margin":10,"outerMargin":true,"scrollSensitivity":10,"scrollSpeed":20,"itemChangeCallback":{"__symbolic":"reference","name":"undefined"},"itemResizeCallback":{"__symbolic":"reference","name":"undefined"},"draggable":{"enabled":false,"ignoreContentClass":"gridster-item-content","stop":{"__symbolic":"reference","name":"undefined"}},"resizable":{"enabled":false,"handles":{"s":true,"e":true,"n":true,"w":true,"se":true,"ne":true,"sw":true,"nw":true},"stop":{"__symbolic":"reference","name":"undefined"}},"swap":true}}}] |
@@ -32,2 +32,3 @@ export declare type GridType = 'fit' | 'scrollVertical' | 'scrollHorizontal' | 'fixed'; | ||
enabled?: boolean; | ||
ignoreContentClass?: string; | ||
stop?: Function; | ||
@@ -34,0 +35,0 @@ } |
@@ -32,2 +32,11 @@ "use strict"; | ||
} | ||
var path = e.path; | ||
var i = 0; | ||
var l = path.length; | ||
var contentClass = this.gridsterItem.gridster.state.options.draggable.ignoreContentClass; | ||
for (; i < l; i++) { | ||
if (path[i].classList && path[i].classList.contains(contentClass)) { | ||
return; | ||
} | ||
} | ||
e.stopPropagation(); | ||
@@ -34,0 +43,0 @@ if (e.pageX === undefined && e.touches) { |
@@ -110,3 +110,3 @@ "use strict"; | ||
template: "<ng-content></ng-content> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.s || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-s\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.e || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-e\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.n || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-n\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.w || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-w\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.se || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-se\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.ne || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-ne\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.sw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-sw\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.nw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-nw\"></div>", | ||
styles: [":host { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; box-sizing: border-box; z-index: 1; position: absolute; overflow: hidden; transition: .3s; display: none; background: white; } :host(.gridster-item-moving) { cursor: move; } :host(.gridster-item-resizing), :host(.gridster-item-moving) { transition: 0s; z-index: 2; box-shadow: 0 0 5px 5px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); } .gridster-item-resizable-handler { position: absolute; z-index: 2; } .gridster-item-resizable-handler.handle-n { cursor: n-resize; height: 10px; right: 0; top: 0; left: 0; } .gridster-item-resizable-handler.handle-e { cursor: e-resize; width: 10px; bottom: 0; right: 0; top: 0; } .gridster-item-resizable-handler.handle-s { cursor: s-resize; height: 10px; right: 0; bottom: 0; left: 0; } .gridster-item-resizable-handler.handle-w { cursor: w-resize; width: 10px; left: 0; top: 0; bottom: 0; } .gridster-item-resizable-handler.handle-ne { cursor: ne-resize; width: 10px; height: 10px; right: 0; top: 0; } .gridster-item-resizable-handler.handle-nw { cursor: nw-resize; width: 10px; height: 10px; left: 0; top: 0; } .gridster-item-resizable-handler.handle-se { cursor: se-resize; width: 0; height: 0; right: 0; bottom: 0; border-style: solid; border-width: 0 0 10px 10px; border-color: transparent; } .gridster-item-resizable-handler.handle-sw { cursor: sw-resize; width: 10px; height: 10px; left: 0; bottom: 0; } :host(:hover) .gridster-item-resizable-handler.handle-se { border-color: transparent transparent #ccc }"] | ||
styles: [":host { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; box-sizing: border-box; z-index: 1; position: absolute; overflow: hidden; transition: .3s; display: none; background: white; } :host(.gridster-item-moving) { cursor: move; } :host(.gridster-item-resizing), :host(.gridster-item-moving) { transition: 0s; z-index: 2; box-shadow: 0 0 5px 5px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); } .gridster-item-resizable-handler { position: absolute; z-index: 2; } .gridster-item-resizable-handler.handle-n { cursor: n-resize; height: 10px; right: 0; top: 0; left: 0; } .gridster-item-resizable-handler.handle-e { cursor: e-resize; width: 10px; bottom: 0; right: 0; top: 0; } .gridster-item-resizable-handler.handle-s { cursor: s-resize; height: 10px; right: 0; bottom: 0; left: 0; } .gridster-item-resizable-handler.handle-w { cursor: w-resize; width: 10px; left: 0; top: 0; bottom: 0; } .gridster-item-resizable-handler.handle-ne { cursor: ne-resize; width: 10px; height: 10px; right: 0; top: 0; } .gridster-item-resizable-handler.handle-nw { cursor: nw-resize; width: 10px; height: 10px; left: 0; top: 0; } .gridster-item-resizable-handler.handle-se { cursor: se-resize; width: 0; height: 0; right: 0; bottom: 0; border-style: solid; border-width: 0 0 10px 10px; border-color: transparent; } .gridster-item-resizable-handler.handle-sw { cursor: sw-resize; width: 10px; height: 10px; left: 0; bottom: 0; } :host /deep/ .gridster-item-content { -webkit-user-select: auto; -moz-user-select: auto; -ms-user-select: auto; user-select: auto; } :host(:hover) .gridster-item-resizable-handler.handle-se { border-color: transparent transparent #ccc }"] | ||
},] }, | ||
@@ -113,0 +113,0 @@ ]; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"GridsterItemComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster-item","template":"<ng-content></ng-content> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.s || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-s\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.e || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-e\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.n || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-n\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.w || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-w\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.se || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-se\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.ne || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-ne\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.sw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-sw\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.nw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-nw\"></div>","styles":[":host { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; box-sizing: border-box; z-index: 1; position: absolute; overflow: hidden; transition: .3s; display: none; background: white; } :host(.gridster-item-moving) { cursor: move; } :host(.gridster-item-resizing), :host(.gridster-item-moving) { transition: 0s; z-index: 2; box-shadow: 0 0 5px 5px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); } .gridster-item-resizable-handler { position: absolute; z-index: 2; } .gridster-item-resizable-handler.handle-n { cursor: n-resize; height: 10px; right: 0; top: 0; left: 0; } .gridster-item-resizable-handler.handle-e { cursor: e-resize; width: 10px; bottom: 0; right: 0; top: 0; } .gridster-item-resizable-handler.handle-s { cursor: s-resize; height: 10px; right: 0; bottom: 0; left: 0; } .gridster-item-resizable-handler.handle-w { cursor: w-resize; width: 10px; left: 0; top: 0; bottom: 0; } .gridster-item-resizable-handler.handle-ne { cursor: ne-resize; width: 10px; height: 10px; right: 0; top: 0; } .gridster-item-resizable-handler.handle-nw { cursor: nw-resize; width: 10px; height: 10px; left: 0; top: 0; } .gridster-item-resizable-handler.handle-se { cursor: se-resize; width: 0; height: 0; right: 0; bottom: 0; border-style: solid; border-width: 0 0 10px 10px; border-color: transparent; } .gridster-item-resizable-handler.handle-sw { cursor: sw-resize; width: 10px; height: 10px; left: 0; bottom: 0; } :host(:hover) .gridster-item-resizable-handler.handle-se { border-color: transparent transparent #ccc }"]}]}],"members":{"item":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"itemChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"itemResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"setSize":[{"__symbolic":"method"}],"itemChanged":[{"__symbolic":"method"}],"checkItemChanges":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterItemComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster-item","template":"<ng-content></ng-content> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.s || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-s\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.e || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-e\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.n || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-n\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.w || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-w\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.se || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-se\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.ne || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-ne\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.sw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-sw\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.nw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-nw\"></div>","styles":[":host { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; box-sizing: border-box; z-index: 1; position: absolute; overflow: hidden; transition: .3s; display: none; background: white; } :host(.gridster-item-moving) { cursor: move; } :host(.gridster-item-resizing), :host(.gridster-item-moving) { transition: 0s; z-index: 2; box-shadow: 0 0 5px 5px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); } .gridster-item-resizable-handler { position: absolute; z-index: 2; } .gridster-item-resizable-handler.handle-n { cursor: n-resize; height: 10px; right: 0; top: 0; left: 0; } .gridster-item-resizable-handler.handle-e { cursor: e-resize; width: 10px; bottom: 0; right: 0; top: 0; } .gridster-item-resizable-handler.handle-s { cursor: s-resize; height: 10px; right: 0; bottom: 0; left: 0; } .gridster-item-resizable-handler.handle-w { cursor: w-resize; width: 10px; left: 0; top: 0; bottom: 0; } .gridster-item-resizable-handler.handle-ne { cursor: ne-resize; width: 10px; height: 10px; right: 0; top: 0; } .gridster-item-resizable-handler.handle-nw { cursor: nw-resize; width: 10px; height: 10px; left: 0; top: 0; } .gridster-item-resizable-handler.handle-se { cursor: se-resize; width: 0; height: 0; right: 0; bottom: 0; border-style: solid; border-width: 0 0 10px 10px; border-color: transparent; } .gridster-item-resizable-handler.handle-sw { cursor: sw-resize; width: 10px; height: 10px; left: 0; bottom: 0; } :host(:hover) .gridster-item-resizable-handler.handle-se { border-color: transparent transparent #ccc }"]}]}],"members":{"item":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"itemChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"itemResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"setSize":[{"__symbolic":"method"}],"itemChanged":[{"__symbolic":"method"}],"checkItemChanges":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"GridsterItemComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster-item","template":"<ng-content></ng-content> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.s || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-s\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.e || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-e\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.n || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-n\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.w || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-w\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.se || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-se\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.ne || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-ne\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.sw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-sw\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.nw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-nw\"></div>","styles":[":host { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; box-sizing: border-box; z-index: 1; position: absolute; overflow: hidden; transition: .3s; display: none; background: white; } :host(.gridster-item-moving) { cursor: move; } :host(.gridster-item-resizing), :host(.gridster-item-moving) { transition: 0s; z-index: 2; box-shadow: 0 0 5px 5px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); } .gridster-item-resizable-handler { position: absolute; z-index: 2; } .gridster-item-resizable-handler.handle-n { cursor: n-resize; height: 10px; right: 0; top: 0; left: 0; } .gridster-item-resizable-handler.handle-e { cursor: e-resize; width: 10px; bottom: 0; right: 0; top: 0; } .gridster-item-resizable-handler.handle-s { cursor: s-resize; height: 10px; right: 0; bottom: 0; left: 0; } .gridster-item-resizable-handler.handle-w { cursor: w-resize; width: 10px; left: 0; top: 0; bottom: 0; } .gridster-item-resizable-handler.handle-ne { cursor: ne-resize; width: 10px; height: 10px; right: 0; top: 0; } .gridster-item-resizable-handler.handle-nw { cursor: nw-resize; width: 10px; height: 10px; left: 0; top: 0; } .gridster-item-resizable-handler.handle-se { cursor: se-resize; width: 0; height: 0; right: 0; bottom: 0; border-style: solid; border-width: 0 0 10px 10px; border-color: transparent; } .gridster-item-resizable-handler.handle-sw { cursor: sw-resize; width: 10px; height: 10px; left: 0; bottom: 0; } :host /deep/ .gridster-item-content { -webkit-user-select: auto; -moz-user-select: auto; -ms-user-select: auto; user-select: auto; } :host(:hover) .gridster-item-resizable-handler.handle-se { border-color: transparent transparent #ccc }"]}]}],"members":{"item":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"itemChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"itemResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"setSize":[{"__symbolic":"method"}],"itemChanged":[{"__symbolic":"method"}],"checkItemChanges":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterItemComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster-item","template":"<ng-content></ng-content> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.s || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-s\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.e || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-e\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.n || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-n\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.w || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-w\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.se || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-se\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.ne || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-ne\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.sw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-sw\"></div> <div (mousedown)=\"state.item.resize.dragStart($event)\" (touchstart)=\"state.item.resize.dragStart($event)\" [hidden]=\"!gridster.state.options.resizable.handles.nw || !state.item.resize.resizeEnabled\" class=\"gridster-item-resizable-handler handle-nw\"></div>","styles":[":host { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; box-sizing: border-box; z-index: 1; position: absolute; overflow: hidden; transition: .3s; display: none; background: white; } :host(.gridster-item-moving) { cursor: move; } :host(.gridster-item-resizing), :host(.gridster-item-moving) { transition: 0s; z-index: 2; box-shadow: 0 0 5px 5px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); } .gridster-item-resizable-handler { position: absolute; z-index: 2; } .gridster-item-resizable-handler.handle-n { cursor: n-resize; height: 10px; right: 0; top: 0; left: 0; } .gridster-item-resizable-handler.handle-e { cursor: e-resize; width: 10px; bottom: 0; right: 0; top: 0; } .gridster-item-resizable-handler.handle-s { cursor: s-resize; height: 10px; right: 0; bottom: 0; left: 0; } .gridster-item-resizable-handler.handle-w { cursor: w-resize; width: 10px; left: 0; top: 0; bottom: 0; } .gridster-item-resizable-handler.handle-ne { cursor: ne-resize; width: 10px; height: 10px; right: 0; top: 0; } .gridster-item-resizable-handler.handle-nw { cursor: nw-resize; width: 10px; height: 10px; left: 0; top: 0; } .gridster-item-resizable-handler.handle-se { cursor: se-resize; width: 0; height: 0; right: 0; bottom: 0; border-style: solid; border-width: 0 0 10px 10px; border-color: transparent; } .gridster-item-resizable-handler.handle-sw { cursor: sw-resize; width: 10px; height: 10px; left: 0; bottom: 0; } :host /deep/ .gridster-item-content { -webkit-user-select: auto; -moz-user-select: auto; -ms-user-select: auto; user-select: auto; } :host(:hover) .gridster-item-resizable-handler.handle-se { border-color: transparent transparent #ccc }"]}]}],"members":{"item":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"itemChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"itemResize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"setSize":[{"__symbolic":"method"}],"itemChanged":[{"__symbolic":"method"}],"checkItemChanges":[{"__symbolic":"method"}]}}}}] |
{ | ||
"name": "angular-gridster2", | ||
"version": "2.6.1", | ||
"version": "2.7.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -145,2 +145,3 @@ angular-gridster2 | ||
enabled: false, // enable/disable draggable items | ||
ignoreContentClass: 'gridster-item-content', // default content class to ignore the drag event from | ||
stop: undefined // callback when dragging an item stops. Accepts Promise return to cancel/approve drag. | ||
@@ -180,2 +181,41 @@ // Arguments: item, gridsterItem, event | ||
### Interact with content without dragging | ||
Option 1 (without text selection): | ||
```html | ||
<gridster-item> | ||
<div (mousedown)="$event.stopPropagation()" (touchstart)="$event.stopPropagation()"> | ||
Some content to click without dragging the widget | ||
</div> | ||
<div class="item-buttons"> | ||
<button md-icon-button md-raised-button class="drag-handler"> | ||
<md-icon>open_with</md-icon> | ||
</button> | ||
<button md-icon-button md-raised-button class="remove-button" (click)="removeItem($event, item)" | ||
(touchstart)="removeItem($event, item)" mdTooltip="Remove"> | ||
<md-icon>clear</md-icon> | ||
</button> | ||
</div> | ||
</gridster-item> | ||
``` | ||
Option 2 (with text selection): | ||
```html | ||
<gridster-item> | ||
<div class="gridster-item-content"> | ||
Some content to select and click without dragging the widget | ||
</div> | ||
<div class="item-buttons"> | ||
<button md-icon-button md-raised-button class="drag-handler"> | ||
<md-icon>open_with</md-icon> | ||
</button> | ||
<button md-icon-button md-raised-button class="remove-button" (click)="removeItem($event, item)" | ||
(touchstart)="removeItem($event, item)" mdTooltip="Remove"> | ||
<md-icon>clear</md-icon> | ||
</button> | ||
</div> | ||
</gridster-item> | ||
``` | ||
##### angular-gridster2 inspired by [angular-gridster](https://github.com/ManifestWebDesign/angular-gridster) | ||
@@ -182,0 +222,0 @@ ### License |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
161414
1489
224