import { __extends } from "../../../node_modules/tslib/tslib.es6.mjs";
import SymbolDraw from "../helper/SymbolDraw.mjs";
import EffectSymbol from "../helper/EffectSymbol.mjs";
import { clone } from "../../../../../../zrender@5.4.4/node_modules/zrender/lib/core/matrix.mjs";
import pointsLayout from "../../layout/points.mjs";
import ChartView from "../../view/Chart.mjs";
var EffectScatterView = (
  /** @class */
  function(_super) {
    __extends(EffectScatterView2, _super);
    function EffectScatterView2() {
      var _this = _super !== null && _super.apply(this, arguments) || this;
      _this.type = EffectScatterView2.type;
      return _this;
    }
    EffectScatterView2.prototype.init = function() {
      this._symbolDraw = new SymbolDraw(EffectSymbol);
    };
    EffectScatterView2.prototype.render = function(seriesModel, ecModel, api) {
      var data = seriesModel.getData();
      var effectSymbolDraw = this._symbolDraw;
      effectSymbolDraw.updateData(data, {
        clipShape: this._getClipShape(seriesModel)
      });
      this.group.add(effectSymbolDraw.group);
    };
    EffectScatterView2.prototype._getClipShape = function(seriesModel) {
      var coordSys = seriesModel.coordinateSystem;
      var clipArea = coordSys && coordSys.getArea && coordSys.getArea();
      return seriesModel.get("clip", true) ? clipArea : null;
    };
    EffectScatterView2.prototype.updateTransform = function(seriesModel, ecModel, api) {
      var data = seriesModel.getData();
      this.group.dirty();
      var res = pointsLayout("").reset(seriesModel, ecModel, api);
      if (res.progress) {
        res.progress({
          start: 0,
          end: data.count(),
          count: data.count()
        }, data);
      }
      this._symbolDraw.updateLayout();
    };
    EffectScatterView2.prototype._updateGroupTransform = function(seriesModel) {
      var coordSys = seriesModel.coordinateSystem;
      if (coordSys && coordSys.getRoamTransform) {
        this.group.transform = clone(coordSys.getRoamTransform());
        this.group.decomposeTransform();
      }
    };
    EffectScatterView2.prototype.remove = function(ecModel, api) {
      this._symbolDraw && this._symbolDraw.remove(true);
    };
    EffectScatterView2.type = "effectScatter";
    return EffectScatterView2;
  }(ChartView)
);
const EffectScatterView$1 = EffectScatterView;
export {
  EffectScatterView$1 as default
};
