Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
adc2019-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
adc2019
adc2019-system
Commits
59b27b52
Commit
59b27b52
authored
Aug 22, 2019
by
Kento HASEGAWA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix zooming on the viewer
parent
79827d1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
adc2019-viewer.js
static/js/adc2019-viewer.js
+6
-7
No files found.
static/js/adc2019-viewer.js
View file @
59b27b52
...
@@ -68,10 +68,10 @@ class ADC2019BoardViewer {
...
@@ -68,10 +68,10 @@ class ADC2019BoardViewer {
let
_self
=
this
;
let
_self
=
this
;
var
zoom
=
d3
.
zoom
()
var
zoom
=
d3
.
zoom
()
.
scaleExtent
([
0.
5
,
5
])
.
scaleExtent
([
0.
2
,
2
])
.
translateExtent
([
.
translateExtent
([
[
-
this
.
width
*
2
,
-
this
.
height
*
2
],
[
-
this
.
width
*
10
,
-
this
.
height
*
10
],
[
this
.
width
*
2
,
this
.
height
*
2
]
[
this
.
width
*
10
,
this
.
height
*
10
]
])
])
.
on
(
"zoom"
,
zoomed
);
.
on
(
"zoom"
,
zoomed
);
...
@@ -81,9 +81,9 @@ class ADC2019BoardViewer {
...
@@ -81,9 +81,9 @@ class ADC2019BoardViewer {
// this.slider.property("value", d3.event.scale);
// this.slider.property("value", d3.event.scale);
}
}
function
slided
(
d
)
{
//
function slided(d) {
zoom
.
scaleTo
(
this
.
svg
,
d3
.
select
(
this
).
property
(
"value"
));
//
zoom.scaleTo(this.svg, d3.select(this).property("value"));
}
//
}
// var slider = d3.select("body").append("input")
// var slider = d3.select("body").append("input")
// .datum({})
// .datum({})
...
@@ -95,7 +95,6 @@ class ADC2019BoardViewer {
...
@@ -95,7 +95,6 @@ class ADC2019BoardViewer {
// .on("input", slided);
// .on("input", slided);
this
.
svg
.
call
(
zoom
).
on
(
'dblclick.zoom'
,
null
);
this
.
svg
.
call
(
zoom
).
on
(
'dblclick.zoom'
,
null
);
}
}
_draw_solution
(
data
){
_draw_solution
(
data
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment