Skip to content

Commit

Permalink
Remove some needless calls.
Browse files Browse the repository at this point in the history
In the svg and canvas object classes, the sceneObject object was
needlessly being called.  Since all features are children of scene
objects, this isn't necessary to call again.
  • Loading branch information
manthey committed Oct 9, 2019
1 parent 722e55c commit d8cfcf1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## Unreleased

### Bug Fixes
- Removed extra calls to sceneObject constructors (#1039)

## Version 0.19.7

### Features
Expand Down
5 changes: 0 additions & 5 deletions src/canvas/object.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
var inherit = require('../inherit');
var sceneObject = require('../sceneObject');

/**
* Canvas specific subclass of object which rerenders when the object is drawn.
* @class
Expand All @@ -19,7 +16,6 @@ var canvas_object = function (arg) {
if (!(this instanceof object)) {
return new canvas_object(arg);
}
sceneObject.call(this);

var m_this = this,
s_draw = this.draw,
Expand Down Expand Up @@ -81,5 +77,4 @@ var canvas_object = function (arg) {
return this;
};

inherit(canvas_object, sceneObject);
module.exports = canvas_object;
5 changes: 0 additions & 5 deletions src/svg/object.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
var inherit = require('../inherit');
var sceneObject = require('../sceneObject');

/**
* SVG specific subclass of object which adds an id property for d3 selections
* on groups of objects by class id.
Expand All @@ -22,7 +19,6 @@ var svg_object = function (arg) {
if (!(this instanceof object)) {
return new svg_object(arg);
}
sceneObject.call(this);

var m_id = 'svg-' + uniqueID(),
s_exit = this._exit,
Expand Down Expand Up @@ -66,5 +62,4 @@ var svg_object = function (arg) {
return this;
};

inherit(svg_object, sceneObject);
module.exports = svg_object;

0 comments on commit d8cfcf1

Please sign in to comment.