Merge pull request #820 from Luis-Fernando-Molina/develop

Contribution: Detaching from Parent Node and from Reference Parent now only possible with Double Click
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-04-18 09:54:42 -04:00
commit 5a7a0ea99d
2 files changed
+10 -9

No files matched your search

@@ -316,12 +316,6 @@ function newCircularMenuItem() {
function onMouseClick() {
if (thisObject.isEnabled === false) { return }
if (thisObject.label === undefined) {
/* This is what we have in the case of menu items that are only Icons. In this situation there is no complex logic, just execute the specified action. */
thisObject.actionFunction({ node: thisObject.payload.node, name: thisObject.action, project: thisObject.actionProject, relatedNodeType: thisObject.relatedUiObject })
return
}
if (thisObject.askConfirmation !== true) { /* No confirmation is needed */
if (temporaryStatus === STATUS_NO_ACTION_TAKEN_YET || temporaryStatus === STATUS_PRIMARY_WORK_DONE) {
executeAction()
@@ -44,8 +44,10 @@ function newUiObjectConstructor() {
payload.floatingObject = floatingObject
/*
When this object is created based on a backup, share or clone, we will have a savedPayload that we will use to set the initial properties.
If it is a new object being created out of the user interface, we jusst continue with the construction process.
When this object is created based on a backup, share or clone,
we will have a savedPayload that we will use to set the initial properties.
If it is a new object being created out of the user interface,
we jusst continue with the construction process.
*/
if (userAddingNew === false && payload.node.type !== 'Workspace') {
let position = {
@@ -81,7 +83,8 @@ function newUiObjectConstructor() {
}
/*
For brand new objects being created directly by the user, we will make them inherit some properties
For brand new objects being created directly by the user,
we will make them inherit some properties
from their closest siblings, and if they don't have, from their parents.
*/
@@ -365,6 +368,8 @@ function newUiObjectConstructor() {
menuItemsInitialValues.push(
{
action: 'Parent Detach',
askConfirmation: true,
confirmationLabel: "Confirm to Detach",
actionFunction: floatingObject.payload.executeAction,
actionProject: 'Superalgos',
label: undefined,
@@ -380,6 +385,8 @@ function newUiObjectConstructor() {
menuItemsInitialValues.push(
{
action: 'Reference Detach',
askConfirmation: true,
confirmationLabel: "Confirm to Detach",
actionFunction: floatingObject.payload.executeAction,
actionProject: 'Superalgos',
label: undefined,