From 3172fd75c7baaeead32015fa0fd490cb4d511db1 Mon Sep 17 00:00:00 2001 From: BarbourSmith Date: Mon, 23 Sep 2019 12:49:46 +0300 Subject: [PATCH] documentation --- src/js/molecules/constant.js | 8 ++++++++ src/js/molecules/input.js | 8 ++++++++ src/js/molecules/output.js | 8 ++++++++ src/js/prototypes/attachmentpoint.js | 9 ++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/js/molecules/constant.js b/src/js/molecules/constant.js index 7dfaee7c..5d8e68f1 100644 --- a/src/js/molecules/constant.js +++ b/src/js/molecules/constant.js @@ -94,7 +94,15 @@ export default class Constant extends Atom{ else if(this.selected){ GlobalVariables.c.fillStyle = this.selectedColor GlobalVariables.c.strokeStyle = this.defaultColor + /** + * This background color + * @type {string} + */ this.color = this.selectedColor + /** + * This atoms accent color + * @type {string} + */ this.strokeColor = this.defaultColor } else{ diff --git a/src/js/molecules/input.js b/src/js/molecules/input.js index 75878da3..dfb8914e 100644 --- a/src/js/molecules/input.js +++ b/src/js/molecules/input.js @@ -92,7 +92,15 @@ export default class Input extends Atom { else if(this.selected){ GlobalVariables.c.fillStyle = this.selectedColor GlobalVariables.c.strokeStyle = this.defaultColor + /** + * This background color + * @type {string} + */ this.color = this.selectedColor + /** + * This atoms accent color + * @type {string} + */ this.strokeColor = this.defaultColor } else{ diff --git a/src/js/molecules/output.js b/src/js/molecules/output.js index b73c8152..22f11131 100644 --- a/src/js/molecules/output.js +++ b/src/js/molecules/output.js @@ -93,7 +93,15 @@ export default class Output extends Atom { else if(this.selected){ GlobalVariables.c.fillStyle = this.selectedColor GlobalVariables.c.strokeStyle = this.defaultColor + /** + * This background color + * @type {string} + */ this.color = this.selectedColor + /** + * This atoms accent color + * @type {string} + */ this.strokeColor = this.defaultColor } else{ diff --git a/src/js/prototypes/attachmentpoint.js b/src/js/prototypes/attachmentpoint.js index ef4a752c..c32158cd 100644 --- a/src/js/prototypes/attachmentpoint.js +++ b/src/js/prototypes/attachmentpoint.js @@ -89,10 +89,17 @@ export default class AttachmentPoint { */ this.type = 'output' /** - * The attachment point current value. Default is 10. + * The attachment point current value. * @type {number} */ this.value = 10 + + /** + * The default value to be used by the ap when nothing is attached + * @type {string} + */ + this.defaultValue = 10 + /** * A flag to indicate if the attachment point is currently ready. Used to order initilization when program is loaded. * @type {string}