angular2-swing icon indicating copy to clipboard operation
angular2-swing copied to clipboard

element is undefined in throwOutConfidence

Open colouredFunk opened this issue 8 years ago • 0 comments

The element object is coming through as undefined

this.stackConfig = { // Default setting only allows UP, LEFT and RIGHT so you can override this as below allowedDirections: [Direction.UP, Direction.DOWN, Direction.LEFT, Direction.RIGHT], // Now need to send offsetX and offsetY with element instead of just offset throwOutConfidence: (offsetX, offsetY, element) => { return Math.min(Math.max(Math.abs(offsetX) / (element.offsetWidth / 1.7), Math.abs(offsetY) / (element.offsetHeight / 2)), 1); }, throwOutDistance: (d) => { return 800; } }

colouredFunk avatar Sep 10 '17 14:09 colouredFunk