-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into jsdoc-vector-feature
- Loading branch information
Showing
11 changed files
with
155 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Vtk.js specific subclass of object which rerenders when the object is drawn. | ||
* | ||
* @class | ||
* @alias geo.vtkjs.object | ||
* @extends geo.sceneObject | ||
* @param {object} arg Options for the object. | ||
* @returns {geo.vtkjs.object} | ||
*/ | ||
var vtkjs_object = function (arg) { | ||
'use strict'; | ||
|
||
var object = require('../object'); | ||
|
||
// this is used to extend other geojs classes, so only generate | ||
// a new object when that is not the case... like if this === window | ||
if (!(this instanceof object)) { | ||
return new vtkjs_object(arg); | ||
} | ||
|
||
var m_this = this, | ||
s_draw = this.draw; | ||
|
||
/** | ||
* Redraw the object. | ||
* | ||
* @returns {this} | ||
*/ | ||
this.draw = function () { | ||
if (m_this.ready) { | ||
m_this._update(); | ||
m_this.renderer()._render(); | ||
s_draw(); | ||
} | ||
return m_this; | ||
}; | ||
|
||
return this; | ||
}; | ||
|
||
module.exports = vtkjs_object; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.