Trying to get offsetHeight of undefined #57

Closed
vamp opened this Issue Dec 2, 2015 · 2 comments

Projects

None yet

2 participants

@vamp
vamp commented Dec 2, 2015

Math.ceil(nodes.length / 2) not works correctly when nodes.length === 1

@NeXTs
Owner
NeXTs commented Dec 2, 2015

Hi Denis
That's a good catch! Thank you, I will fix and update it later today

@NeXTs NeXTs added the bug label Dec 2, 2015
@vamp
vamp commented Dec 2, 2015

@NeXTs, thanks!
p.s. didn't like to write some code in 3d-party scripts, so my solution was:

Clusterize.prototype.getRowsHeight = (function(underlying){
  return function(){
    var ceil = Math.ceil;
    Math.ceil = Math.floor;
    var returnValue = underlying.apply(this, arguments);
    Math.ceil = ceil;
    return returnValue;
  };
})(Clusterize.prototype.getRowsHeight)
@NeXTs NeXTs closed this in 21912dc Dec 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment