Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve line updates #779

Merged
merged 5 commits into from
Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/canvas/lineFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ var registerFeature = require('../registry').registerFeature;
var lineFeature = require('../lineFeature');

/**
* Create a new instance of class lineFeature
* Create a new instance of class lineFeature.
*
* @class geo.canvas.lineFeature
* @extends geo.lineFeature
* @extends geo.canvas.object
* @param {geo.lineFeature.spec} arg
* @returns {geo.canvas.lineFeature}
*/
var canvas_lineFeature = function (arg) {
Expand All @@ -29,9 +29,10 @@ var canvas_lineFeature = function (arg) {

/**
* Render the data on the canvas.
*
* @protected
* @param {object} context2d the canvas context to draw in.
* @param {object} map the parent map object.
* @param {geo.map} map the parent map object.
*/
this._renderOnCanvas = function (context2d, map) {
var data = m_this.data(),
Expand Down
17 changes: 10 additions & 7 deletions src/d3/lineFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ var registerFeature = require('../registry').registerFeature;
var lineFeature = require('../lineFeature');

/**
* Create a new instance of class lineFeature
* Create a new instance of class lineFeature.
*
* @class geo.d3.lineFeature
* @extends geo.lineFeature
* @extends geo.d3.object
* @param {geo.lineFeature.spec} arg
* @returns {geo.d3.lineFeature}
*/
var d3_lineFeature = function (arg) {
Expand Down Expand Up @@ -35,17 +35,20 @@ var d3_lineFeature = function (arg) {
s_update = this._update;

/**
* Initialize
* Initialize.
*
* @param {geo.lineFeature.spec} arg The feature specification.
* @returns {this}
*/
this._init = function (arg) {
s_init.call(m_this, arg);
return m_this;
};

/**
* Build
* Build. Create the necessary elements to render lines.
*
* @override
* @returns {this}
*/
this._build = function () {
var data = m_this.data() || [],
Expand Down Expand Up @@ -109,9 +112,9 @@ var d3_lineFeature = function (arg) {
};

/**
* Update
* Update. Rebuild if necessary.
*
* @override
* @returns {this}
*/
this._update = function () {
s_update.call(m_this);
Expand Down
Loading