-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from calband/dev/quick_gen_pdf
Issue #161: Support CalChart's new Viewer File exporter with Close
- Loading branch information
Showing
7 changed files
with
97 additions
and
6 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,38 @@ | ||
/** | ||
* @fileOverview Defines the MovementCommandClose class. | ||
*/ | ||
|
||
var JSUtils = require("./utils/JSUtils"); | ||
var MovementCommand = require("./MovementCommand"); | ||
var AnimationState = require("./AnimationState"); | ||
|
||
/** | ||
* A MovementCommand representing being closed. | ||
* @param {float} x The x coordinate to stand at. | ||
* @param {float} y The y coordinate to stand at. | ||
* @param {float} orientation The angle at which the marcher will | ||
* face while standing. This is measured in degrees relative | ||
* to Grapher standard position (@see MathUtils.js for a definition | ||
* of "grapher standard position). | ||
* @param {int} beats The duration of the movement, in beats. | ||
*/ | ||
var MovementCommandClose = function(x, y, orientation, beats) { | ||
this._orientation = orientation; | ||
MovementCommand.apply(this, [x, y, x, y, beats]); | ||
}; | ||
|
||
JSUtils.extends(MovementCommandClose, MovementCommand); | ||
|
||
MovementCommandClose.prototype.getAnimationState = function(beatNum) { | ||
return new AnimationState(this._startX, this._startY, this._orientation); | ||
}; | ||
|
||
/** | ||
* Returns the continuity text for this movement | ||
* @return {String} the continuity text in the form of "Close E" | ||
*/ | ||
MovementCommandClose.prototype.getContinuityText = function() { | ||
return "Close " + this.getOrientation(); | ||
}; | ||
|
||
module.exports = MovementCommandClose; |
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