Remove unused functions and notes, improve a comment.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ic62f276983614bfbc56b50e3b0f37b1ea82c4d1a
This commit is contained in:
Gökay Şatır 2024-04-19 11:21:42 +03:00 committed by Gökay ŞATIR
parent cfeba70dab
commit f64a5c3310

View file

@ -3895,7 +3895,7 @@ L.CanvasTileLayer = L.Layer.extend({
// Scrolls the view to selected position
scrollToPos: function(pos) {
if (pos.pX) // Turn into lat/lng if required.
if (pos.pX) // Turn into lat/lng if required (pos may also be a simplePoint.).
pos = this._twipsToLatLng({ x: pos.x, y: pos.y });
var center = this._map.project(pos);
@ -4682,7 +4682,6 @@ L.CanvasTileLayer = L.Layer.extend({
this._updateCursorAndOverlay();
},
// TODO: unused variables: horizontalDirection, verticalDirection
// TODO: used only in calc: move to CalcTileLayer
_onUpdateCellCursor: function (onPgUpDn, scrollToCursor, sameAddress) {
this._onUpdateCellResizeMarkers();
@ -6492,26 +6491,6 @@ L.CanvasTileLayer = L.Layer.extend({
return L.TileCoordData.parseKey(key);
},
_keyToBounds: function (key) {
return this._tileCoordsToBounds(this._keyToTileCoords(key));
},
_tileCoordsToBounds: function (coords) {
var map = this._map;
var tileSize = this._getTileSize();
var nwPoint = new L.Point(coords.x, coords.y);
var sePoint = nwPoint.add([tileSize, tileSize]);
nwPoint = this._corePixelsToCss(nwPoint);
sePoint = this._corePixelsToCss(sePoint);
var nw = map.unproject(nwPoint, coords.z);
var se = map.unproject(sePoint, coords.z);
return new L.LatLngBounds(nw, se);
},
// Fix for cool#5876 allow immediate reuse of canvas context memory
// WKWebView has a hard limit on the number of bytes of canvas
// context memory that can be allocated. Reducing the canvas