Commit 59b27b52 authored by Kento HASEGAWA's avatar Kento HASEGAWA
Browse files

Fix zooming on the viewer

parent 79827d1a
Loading
Loading
Loading
Loading
+6 −7
Changes for static/js/adc2019-viewer.js: 6 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -68,10 +68,10 @@ class ADC2019BoardViewer {
        let _self = this;

        var zoom = d3.zoom()
            .scaleExtent([0.5, 5])
            .scaleExtent([0.2, 2])
            .translateExtent([
                [-this.width * 2, -this.height * 2],
                [this.width * 2, this.height * 2]
                [-this.width * 10, -this.height * 10],
                [this.width * 10, this.height * 10]
                ])
            .on("zoom", zoomed);

@@ -81,9 +81,9 @@ class ADC2019BoardViewer {
            // this.slider.property("value", d3.event.scale);
        }

        function slided(d) {
            zoom.scaleTo(this.svg, d3.select(this).property("value"));
        }
        // function slided(d) {
        //     zoom.scaleTo(this.svg, d3.select(this).property("value"));
        // }
        
        // var slider = d3.select("body").append("input")
        //     .datum({})
@@ -95,7 +95,6 @@ class ADC2019BoardViewer {
        //     .on("input", slided);

        this.svg.call(zoom).on('dblclick.zoom', null);

    }

    _draw_solution(data){