How to use dbly-linked-list - 2 common examples

To help you get started, we’ve selected a few dbly-linked-list examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github l3p-cv / lost / frontend / lost / src / tools / sia / src / drawables / multipoint / MultipointPresenter.js View on Github external
})
        // quickfix: update menu bar. maybe there is a better solution.
        this.model.actBounds.on("update", (bounds) => {
            this.menuBar.setWidth(bounds.w + 2 * POINT_DEFAULTS.getRadius(false) + 2 * POINT_DEFAULTS.getStrokeWidth())
            svg.setTranslation(this.view.html.refs["container-node"], { 
                x: bounds.left - POINT_DEFAULTS.getOutlineRadius(true) / 2 - POINT_DEFAULTS.getStrokeWidth(),
                y: bounds.top - POINT_DEFAULTS.getOutlineRadius(true) - POINT_DEFAULTS.getStrokeWidth(),
            })
        })

        // add a back reference for all internal drawables.
        this.model.points.forEach((point, index) => extendPoint(point, index, this))

        // add a doubly linked list for being able to track point selection. and use it in edit features.
        // and add second to last point to the point selection list.
        this.pointSelectionList = new DoublyLinkedList()
        this.model.points.forEach((point, index) => {
            if(index >= 1){
                this.pointSelectionList.insert(point)
            }
        })
    }
    onHover(){

dbly-linked-list

Javascript implementation of a doubly linked-list data structure

MIT
Latest version published 3 years ago

Package Health Score

47 / 100
Full package analysis

Popular dbly-linked-list functions