projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add comment to resize test case as a follow on to pull request 260.
[dygraphs.git]
/
dygraph.js
diff --git
a/dygraph.js
b/dygraph.js
index
442c00c
..
db9a8bf
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-3707,9
+3707,10
@@
Dygraph.prototype.resize = function(width, height) {
this.height_ = this.maindiv_.clientHeight;
}
this.height_ = this.maindiv_.clientHeight;
}
- this.resizeElements_();
-
if (old_width != this.width_ || old_height != this.height_) {
if (old_width != this.width_ || old_height != this.height_) {
+ // Resizing a canvas erases it, even when the size doesn't change, so
+ // any resize needs to be followed by a redraw.
+ this.resizeElements_();
this.predraw_();
}
this.predraw_();
}