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

Fix zooming on the viewer

parent 79827d1a
......@@ -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){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment