Skip to content

Commit

Permalink
resetTextWidthCache added
Browse files Browse the repository at this point in the history
  • Loading branch information
stevewirts committed May 16, 2015
1 parent 41531a2 commit 7c000fa
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
16 changes: 16 additions & 0 deletions fin-hypergrid.dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -21709,6 +21709,10 @@
gc.closePath();
},

resetTextWidthCache: function() {
textWidthCache = new SimpleLRU(10000);
},

blankOutOverflow: function(gc) {
var isMaxX = this.isLastColumnVisible();
var chop = isMaxX ? 2 : 1;
Expand Down Expand Up @@ -34519,6 +34523,18 @@
behavior.setRenderedHeight(this.getViewableRows() + 1);
},

/**
* @function
* @instance
* @description
Empty out the textWidthCache
*
* @param {event} event - the copy system event
*/
resetTextWidthCache: function() {
this.getRenderer().resetTextWidthCache();
},

/**
* @function
* @instance
Expand Down
6 changes: 3 additions & 3 deletions fin-hypergrid.min.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions polymer/js/fin-hypergrid-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ var config = {
gc.closePath();
},

resetTextWidthCache: function() {
textWidthCache = new SimpleLRU(10000);
},

blankOutOverflow: function(gc) {
var isMaxX = this.isLastColumnVisible();
var chop = isMaxX ? 2 : 1;
Expand Down
12 changes: 12 additions & 0 deletions polymer/js/fin-hypergrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,18 @@
behavior.setRenderedHeight(this.getViewableRows() + 1);
},

/**
* @function
* @instance
* @description
Empty out the textWidthCache
*
* @param {event} event - the copy system event
*/
resetTextWidthCache: function() {
this.getRenderer().resetTextWidthCache();
},

/**
* @function
* @instance
Expand Down

0 comments on commit 7c000fa

Please sign in to comment.