Skip to content

element is undefined in throwOutConfidence #36

@colouredFunk

Description

@colouredFunk

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; } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions