From 5ceed3b6bfe69d8b650cb347335329110d24f357 Mon Sep 17 00:00:00 2001 From: Dario Del Piano Date: Wed, 15 Jan 2020 13:56:27 +0100 Subject: [PATCH 1/4] fixed splash screen image on geppeto.ejs --- .../stackViewer/StackViewerComponent.js | 28 ++++++++++--------- js/pages/geppetto/geppetto.ejs | 7 +++-- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/js/components/widgets/stackViewer/StackViewerComponent.js b/js/components/widgets/stackViewer/StackViewerComponent.js index 5e8afbf68..fa038a2bf 100644 --- a/js/components/widgets/stackViewer/StackViewerComponent.js +++ b/js/components/widgets/stackViewer/StackViewerComponent.js @@ -443,18 +443,21 @@ define(function (require) { success: function (data) { result = data.trim().split(':')[1].trim().split(' '); if (result !== '') { - for (j in result) { - if (result[j].trim() !== '') { - var index = Number(result[j]); - if (i !== 0 || index !== 0) { // don't select template - if (index == 0) { - if (!shift) { - that.state.objects.push(that.state.label[i]); - } - } else { - if (typeof that.props.templateDomainIds !== 'undefined' && typeof that.props.templateDomainNames !== 'undefined' && typeof that.props.templateDomainIds[index] !== 'undefined' && typeof that.props.templateDomainNames[index] !== 'undefined' && that.props.templateDomainNames[index] !== null) { - that.state.objects.push(that.props.templateDomainNames[index]); - break; + var currentPosition = that.renderer.plugins.interaction.mouse.getLocalPosition(that.stack); + if (callX == currentPosition.x.toFixed(0) && callY == currentPosition.y.toFixed(0)) { + for (j in result) { + if (result[j].trim() !== '') { + var index = Number(result[j]); + if (i !== 0 || index !== 0) { // don't select template + if (index == 0) { + if (!shift) { + that.state.objects.push(that.state.label[i]); + } + } else { + if (typeof that.props.templateDomainIds !== 'undefined' && typeof that.props.templateDomainNames !== 'undefined' && typeof that.props.templateDomainIds[index] !== 'undefined' && typeof that.props.templateDomainNames[index] !== 'undefined' && that.props.templateDomainNames[index] !== null) { + that.state.objects.push(that.props.templateDomainNames[index]); + break; + } } } } @@ -486,7 +489,6 @@ define(function (require) { }); })(i, that); }); - that.state.loadingLabels = false; } }, diff --git a/js/pages/geppetto/geppetto.ejs b/js/pages/geppetto/geppetto.ejs index fb7399c97..f864bf22e 100644 --- a/js/pages/geppetto/geppetto.ejs +++ b/js/pages/geppetto/geppetto.ejs @@ -31,7 +31,7 @@ <% } %> - +