diff --git a/js/app/map/map.js b/js/app/map/map.js index 096f10da..cb520cd8 100644 --- a/js/app/map/map.js +++ b/js/app/map/map.js @@ -522,7 +522,6 @@ define([ case 'add_system': // add a new system System.showNewSystemDialog(map, {sourceSystem: system}, saveSystemCallback); - break; case 'lock_system': // lock system @@ -670,7 +669,6 @@ define([ // open map info dialog tab $(document).triggerMenuEvent('ShowMapInfo', {tab: 'information'}); break; - } }; @@ -745,19 +743,12 @@ define([ switch(action){ case 'bubble': - console.log(endpoint.getType()) - //console.log(endpoint.getParameters() ) mapElement.getMapOverlay('timer').startMapUpdateCounter(); endpoint.toggleType(action); - //endpoint.setParameter('test', 123); for(let connection of endpoint.connections){ $(connection).markAsChanged(); } - //$(connection).markAsChanged(); - - console.log(endpoint.getType()) - //console.log(endpoint.getParameters() ) break; } }; @@ -899,8 +890,6 @@ define([ label && connectionData.endpoints[label] && Array.isArray(connectionData.endpoints[label].types) ){ - console.log('draw con add Type: ', connectionData.endpoints[label].types) - for(let type of connectionData.endpoints[label].types){ endpoint.addType(type); } @@ -993,10 +982,6 @@ define([ connection.setParameter('eolUpdated', newConnectionData.eolUpdated); connection.setParameter('changed', false); - console.log('update con -------------', connectionData.id) - console.log(connectionData) - console.log(newConnectionData) - return connection; }; diff --git a/js/app/map/util.js b/js/app/map/util.js index 87d28d25..8f7fdc81 100644 --- a/js/app/map/util.js +++ b/js/app/map/util.js @@ -283,6 +283,12 @@ define([ return mapElement.find('.' + config.systemSelectedClass); }; + /** + * filter jsPlumb connection or endpoint types + * -> remove default type(s) + * @param types + * @returns {*} + */ let filterDefaultTypes = types => { return types.filter(type => type.length > 0 && type !== 'default' && type !== 'active'); }; @@ -296,6 +302,11 @@ define([ return endpoint.isSource ? 'source' : endpoint.isTarget ? 'target' : false; }; + /** + * get data from endpoint + * @param endpoint + * @returns {{types: *, label: string}} + */ let getDataByEndpoint = endpoint => { return { label: getLabelByEndpoint(endpoint), diff --git a/js/app/render.js b/js/app/render.js index 9e7f956c..3a5bd2d0 100644 --- a/js/app/render.js +++ b/js/app/render.js @@ -13,7 +13,7 @@ define(['jquery', 'mustache'], ($, Mustache) => { * @returns {Promise} */ let render = (path, data) => { - let renderExecutor = (resolve) => { + let renderExecutor = resolve => { requirejs(['text!templates/' + path + '.html'], template => { resolve(Mustache.render(template, data)); }); diff --git a/public/js/v1.5.1/app/map/map.js b/public/js/v1.5.1/app/map/map.js index 096f10da..cb520cd8 100644 --- a/public/js/v1.5.1/app/map/map.js +++ b/public/js/v1.5.1/app/map/map.js @@ -522,7 +522,6 @@ define([ case 'add_system': // add a new system System.showNewSystemDialog(map, {sourceSystem: system}, saveSystemCallback); - break; case 'lock_system': // lock system @@ -670,7 +669,6 @@ define([ // open map info dialog tab $(document).triggerMenuEvent('ShowMapInfo', {tab: 'information'}); break; - } }; @@ -745,19 +743,12 @@ define([ switch(action){ case 'bubble': - console.log(endpoint.getType()) - //console.log(endpoint.getParameters() ) mapElement.getMapOverlay('timer').startMapUpdateCounter(); endpoint.toggleType(action); - //endpoint.setParameter('test', 123); for(let connection of endpoint.connections){ $(connection).markAsChanged(); } - //$(connection).markAsChanged(); - - console.log(endpoint.getType()) - //console.log(endpoint.getParameters() ) break; } }; @@ -899,8 +890,6 @@ define([ label && connectionData.endpoints[label] && Array.isArray(connectionData.endpoints[label].types) ){ - console.log('draw con add Type: ', connectionData.endpoints[label].types) - for(let type of connectionData.endpoints[label].types){ endpoint.addType(type); } @@ -993,10 +982,6 @@ define([ connection.setParameter('eolUpdated', newConnectionData.eolUpdated); connection.setParameter('changed', false); - console.log('update con -------------', connectionData.id) - console.log(connectionData) - console.log(newConnectionData) - return connection; }; diff --git a/public/js/v1.5.1/app/map/util.js b/public/js/v1.5.1/app/map/util.js index 87d28d25..8f7fdc81 100644 --- a/public/js/v1.5.1/app/map/util.js +++ b/public/js/v1.5.1/app/map/util.js @@ -283,6 +283,12 @@ define([ return mapElement.find('.' + config.systemSelectedClass); }; + /** + * filter jsPlumb connection or endpoint types + * -> remove default type(s) + * @param types + * @returns {*} + */ let filterDefaultTypes = types => { return types.filter(type => type.length > 0 && type !== 'default' && type !== 'active'); }; @@ -296,6 +302,11 @@ define([ return endpoint.isSource ? 'source' : endpoint.isTarget ? 'target' : false; }; + /** + * get data from endpoint + * @param endpoint + * @returns {{types: *, label: string}} + */ let getDataByEndpoint = endpoint => { return { label: getLabelByEndpoint(endpoint),