-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable orphaned nodes editing #59
Conversation
…eatures/orphaned-nodes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor-ish comments. LGTM otherwise!
example/missing-n-duplicate.scene
Outdated
} | ||
}, | ||
"inherits": "./ArchitectureKit/Pillar1x3Rnd.gltf" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't actually demonstrate duplicate nodes.
@@ -0,0 +1,97 @@ | |||
export default class ConflictHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, if a module exports a single default class, I think we want the file name to match the class name.
} | ||
}; | ||
|
||
setDuplicateStatus = newStatus => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a class member is only used internally, or meant for private use, we start them with an underscore. I think that applies to a few of the methods in this class. Also applies to properties like duplicateList
.
return this.duplicateList[name] > 1; | ||
}; | ||
|
||
getMissingStatus = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this method is not used anywhere.
}); | ||
}; | ||
|
||
checkResolvedMissinRoot = scene => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
this.setMissingStatus(newStatus); | ||
return resolvedList; | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job on refactoring this out into a class! It's much cleaner now.
list.forEach(resolvedMissingRoot => { | ||
this.props.editor.removeObject(resolvedMissingRoot); | ||
}); | ||
if (handler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I guess we're doing this because new scenes don't have conflictHandlers? Maybe they should.
Doesn't have to be fixed in this PR, but this kind of if
statement (without an else
) could lead to some surprising bugs. Maybe just keep a mental note to come back to this.
Enable orphaned nodes editing
missing-n-duplicate.scene
andmissing-node2.scene
)