| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- var Util = require('../util/common');
- var Base =
- /*#__PURE__*/
- function () {
- var _proto = Base.prototype;
- _proto._initDefaultCfg = function _initDefaultCfg() {};
- function Base(cfg) {
- this._initDefaultCfg();
- Util.mix(this, cfg);
- var start;
- var end;
- if (this.plot) {
- start = this.plot.bl;
- end = this.plot.tr;
- this.start = start;
- this.end = end;
- } else {
- start = this.start;
- end = this.end;
- }
- this.init(start, end);
- }
- _proto.init = function init() {};
- _proto.convertPoint = function convertPoint(point) {
- return point;
- };
- _proto.invertPoint = function invertPoint(point) {
- return point;
- };
- _proto.reset = function reset(plot) {
- this.plot = plot;
- var bl = plot.bl,
- tr = plot.tr;
- this.start = bl;
- this.end = tr;
- this.init(bl, tr);
- };
- return Base;
- }();
- module.exports = Base;
|