Permalink
Browse files

DFL-2502 The method doesn't need to be exposed to the outside.

  • Loading branch information...
1 parent 475197c commit fc6f1138b55849fb808d6b8a7284dc5283cc53cf @rcopera rcopera committed Sep 9, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/ecma-debugger/js-source-view.js
@@ -986,7 +986,7 @@ cls.JsSourceView = function(id, name, container_class)
const UNIT_LINES = 1;
const UNIT_PIXELS = 2;
- this._get_lines_from_delta = function(delta, unit)
+ var _get_lines_from_delta = function(delta, unit)
{
var lines;
if (unit == UNIT_LINES)
@@ -1004,8 +1004,8 @@ cls.JsSourceView = function(id, name, container_class)
if (Math.abs(delta) >= 1)
{
- // Enough delta to scroll at least one line, round delta to
- // integer and store remainder for later.
+ // Enough delta to scroll at least one line, round delta
+ // to full integer towards 0 and store remainder for later.
lines = delta >= 1 ? Math.floor(delta) : Math.ceil(delta);
_accumulated_delta = delta % 1;
}
@@ -1025,7 +1025,7 @@ cls.JsSourceView = function(id, name, container_class)
// Horizontal scrolling is handled natively by the browser.
return;
- var lines = this._get_lines_from_delta(-event.wheelDelta / 40, unit);
+ var lines = _get_lines_from_delta(-event.wheelDelta / 40, unit);
if (lines)
this._scroll_lines(lines, event, target);
}.bind(this, navigator.platform == 'MacIntel' ? UNIT_PIXELS : UNIT_LINES);

1 comment on commit fc6f113

Contributor

chriskr commented on fc6f113 Sep 9, 2012

This was OK before. This file is not a very good as example of our style guide, it's very old and should be cleaned up. We only have private members by convention, not technically (the same as Python), mainly because real private members are getting too expensive with inheritance. It means accessing an underscored member on something else than this is wrong.

Please sign in to comment.