Skip to content

Commit c04a5f6

Browse files
committed
adding better comments
1 parent f98fd1c commit c04a5f6

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/js/modal-styleguide.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ var modalStyleguide = {
3434
},
3535

3636
/**
37-
* toggle the modal window open and closed
37+
* toggle the modal window open and closed based on clicking the pip
38+
* @param {String} the patternPartial that identifies what needs to be toggled
3839
*/
3940
toggle: function(patternPartial) {
4041
if ((modalStyleguide.active[patternPartial] === undefined) || !modalStyleguide.active[patternPartial]) {
@@ -47,7 +48,9 @@ var modalStyleguide = {
4748
},
4849

4950
/**
50-
* open the modal window
51+
* open the modal window for a view-all entry
52+
* @param {String} the patternPartial that identifies what needs to be opened
53+
* @param {String} the content that should be inserted
5154
*/
5255
open: function(patternPartial, content) {
5356

@@ -81,7 +84,8 @@ var modalStyleguide = {
8184
},
8285

8386
/**
84-
* close the modal window
87+
* close the modal window for a view-all entry
88+
* @param {String} the patternPartial that identifies what needs to be closed
8589
*/
8690
close: function(patternPartial) {
8791

@@ -94,6 +98,12 @@ var modalStyleguide = {
9498

9599
},
96100

101+
/**
102+
* get the data that needs to be send to the viewer for rendering
103+
* @param {Element} the identifier for the element that needs to be collected
104+
* @param {Boolean} if the refresh is of a view-all view and the content should be sent back
105+
* @param {Boolean} if the text in the dropdown should be switched
106+
*/
97107
collectAndSend: function(el, iframePassback, switchText) {
98108
var patternData = JSON.parse(el.innerHTML);
99109
patternMarkupEl = document.querySelector('#'+patternData.patternPartial+' > .sg-pattern-example');
@@ -103,6 +113,9 @@ var modalStyleguide = {
103113

104114
/**
105115
* return the pattern info to the top level
116+
* @param {Object} the content that will be sent to the viewer for rendering
117+
* @param {Boolean} if the refresh is of a view-all view and the content should be sent back
118+
* @param {Boolean} if the text in the dropdown should be switched
106119
*/
107120
patternQueryInfo: function(patternData, iframePassback, switchText) {
108121

0 commit comments

Comments
 (0)