-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstlViewerEvents.js
More file actions
39 lines (35 loc) · 1.02 KB
/
stlViewerEvents.js
File metadata and controls
39 lines (35 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* This handles events and calls the appropriate function to handle
* the event.
*/
View.prototype.stlViewerDispatcher = function(type,args,obj){
/*
* check to see if the event name matches
*/
if(type == 'stlViewerUpdatePrompt') {
/*
* the event name matches so we will call the function that
* handles that event
*/
obj.StlViewerNode.updatePrompt();
}
};
/*
* this is a list of events that can be fired. when the event is fired,
* the dispatcher function above will be called and then call the
* appropriate function to handle the event.
*/
var events = [
'stlViewerUpdatePrompt'
];
/*
* add all the events to the vle so the vle will listen for these events
* and call the dispatcher function when the event is fired
*/
for(var x=0; x<events.length; x++) {
componentloader.addEvent(events[x], 'stlViewerDispatcher');
};
//used to notify scriptloader that this script has finished loading
if(typeof eventManager != 'undefined'){
eventManager.fire('scriptLoaded', 'vle/node/stlViewer/stlViewerEvents.js');
};