Skip to content

Commit

Permalink
some doc fix in oNode and scene.selectedPalette now returns null when…
Browse files Browse the repository at this point in the history
… no palette exists.
  • Loading branch information
mchaptel committed Jun 20, 2020
1 parent 7f4f31a commit 5acee06
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions openHarmony/openHarmony_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,8 @@ $.oNode.prototype.unlinkInPort = function( inPort ){

/**
* Returns the node connected to a specific in-port
* @param {int} inPort the number of the port to get the linked Node from.
* @return {int} the number of links
* @param {int} inPort the number of the port to get the linked Node from.
* @return {$.oNode} The node connected to this in-port
*/
$.oNode.prototype.getLinkedInNode = function(inPort){
if (this.inPorts < inPort) return null;
Expand Down Expand Up @@ -1057,6 +1057,7 @@ $.oNode.prototype.unlinkOutNode = function( oNodeObject ){
* Returns the node connected to a specific outPort
* @param {int} outPort the number of the port to get the node from.
* @param {int} [outLink=0] the index of the link.
* @return {$.oNode} The node connected to this outPort and outLink
*/
$.oNode.prototype.getLinkedOutNode = function(outPort, outLink){
if (typeof outLink == 'undefined') var outLink = 0;
Expand Down
5 changes: 3 additions & 2 deletions openHarmony/openHarmony_scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,15 +587,16 @@ Object.defineProperty($.oScene.prototype, 'selectedFrames', {


/**
* Retrieve and set the selected palette.
* Retrieve and set the selected palette from the scene palette list.
* @type {$.oPalette} oPalette with provided name.
*/
Object.defineProperty($.oScene.prototype, "selectedPalette", {
get: function(){
var _paletteList = PaletteObjectManager.getScenePaletteList()
var _id = PaletteManager.getCurrentPaletteId()
if (_id == "") return null;
var _palette = new this.$.oPalette(_paletteList.getPaletteById(_id), _paletteList);
return _palette;
return _palette;
},

set: function(newSelection){
Expand Down
2 changes: 1 addition & 1 deletion tbpackage.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"extensions": [
{
"name": "openHarmony",
"version": "0.2.7",
"version": "0.2.8",
"compatibility": "Harmony Premium 15",
"description": "<p>The openHarmony library enables people to create scripts for Harmony using less code and a simpler synthax.</p><p>The complete documentation is available at this address:<a href='https://cfourney.github.io/OpenHarmony/'>https://cfourney.github.io/OpenHarmony/</a></p><p>Install this library to be able to use the scripts that require it.</p>",
"repository": "https://github.com/cfourney/OpenHarmony/",
Expand Down

0 comments on commit 5acee06

Please sign in to comment.