cartodb-4.42/lib/assets/javascripts/builder/editor/style/style-defaults/animation-style-defaults.js
2024-04-06 05:25:13 +00:00

44 lines
879 B
JavaScript
Executable File

var _ = require('underscore');
var SimpleStyleDefaults = require('./simple-style-defaults');
module.exports = _.defaults({
generateAttributes: function (geometryType) {
return _.extend(
this._getStyleTypeAttrs(),
this._getFillAttrs(geometryType),
this._getStrokeAttrs(geometryType),
{
blending: 'lighter'
},
this._getAggrAttrs(geometryType),
this._getAnimatedAttrs(geometryType)
);
},
_getStyleTypeAttrs: function () {
return {
style: 'simple'
};
},
_getAnimatedAttrs: function (geometryType) {
return {
animated: {
attribute: null,
overlap: false,
duration: 30,
steps: 256,
trails: 2,
resolution: 4
}
};
},
_getAggrAttrs: function (geometryType) {
return {
aggregation: {}
};
}
}, SimpleStyleDefaults);