Closed sanak closed 1 year ago
Consider to refactor the followings.
EditingToolbarExt.js
logic to tester.js
, then remove EditingToolbarExt.js
.tester.js
as some class (Tester
) and call instance method in html event handler to remove exposing window.(method name)
in js).Related with the 2nd task (wrapping tester.js
as some class (Tester
)), I am not sure what is the best solution.
Recent JavaScript class seems to support private class fields, but I haven't seen the use case. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields
From the following Stack Overflow post, most scored one is legacy function + this way was the most understandable way for me. https://stackoverflow.com/questions/55611/javascript-private-methods?answertab=scoredesc#tab-top
Done in tester
branch.
From the past ol2 releases (https://github.com/openlayers/ol2/releases), current OpenLayers version seems to be 2.7.
Before upgrading OpenLayers 7.5.0, consider to upgrade patch version with refactoring current codes as much as possible.