Call the new mouse event handler function.
Also apply some refactoring on the code for better readability.
This commit is contained in:
14
script.js
14
script.js
@@ -316,11 +316,19 @@ $(function() {
|
|||||||
var contentTemplate = Handlebars.compile(contentSource);
|
var contentTemplate = Handlebars.compile(contentSource);
|
||||||
$('#key-editor-content__target').html(contentTemplate(contentContext[tplName]));
|
$('#key-editor-content__target').html(contentTemplate(contentContext[tplName]));
|
||||||
var noSearch = false;
|
var noSearch = false;
|
||||||
if (tplName == "layer") {
|
switch (tplName) {
|
||||||
|
case 'layer':
|
||||||
noSearch = true;
|
noSearch = true;
|
||||||
}
|
|
||||||
initSelect2items(noSearch);
|
case 'keypress':
|
||||||
_keypress_event_handlers();
|
_keypress_event_handlers();
|
||||||
|
|
||||||
|
case 'mouse':
|
||||||
|
_mouse_event_handlers();
|
||||||
|
|
||||||
|
default:
|
||||||
|
initSelect2items(noSearch);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user