mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
feat: make isMutator public (#6316)
* feat: make isMutator public * fix: move isFlyout and isMutator to getters * chore: delete change detector test
This commit is contained in:
@@ -255,7 +255,7 @@ export abstract class Flyout extends DeleteArea implements IFlyout {
|
||||
this.workspace_.setMetricsManager(
|
||||
new FlyoutMetricsManager(this.workspace_, this));
|
||||
|
||||
this.workspace_.isFlyout = true;
|
||||
this.workspace_.internalIsFlyout = true;
|
||||
// Keep the workspace visibility consistent with the flyout's visibility.
|
||||
this.workspace_.setVisible(this.isVisible_);
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ export class Mutator extends Icon {
|
||||
workspaceOptions.languageTree = toolbox.convertToolboxDefToJson(quarkXml);
|
||||
}
|
||||
this.workspace_ = this.newWorkspaceSvg(workspaceOptions);
|
||||
this.workspace_.isMutator = true;
|
||||
this.workspace_.internalIsMutator = true;
|
||||
this.workspace_.addChangeListener(eventUtils.disableOrphans);
|
||||
|
||||
// Mutator flyouts go inside the mutator workspace's <g> rather than in
|
||||
|
||||
@@ -61,14 +61,27 @@ export class Workspace implements IASTNodeLocation {
|
||||
*/
|
||||
rendered = false;
|
||||
|
||||
/**
|
||||
* Is this workspace the surface for a flyout?
|
||||
* @internal
|
||||
*/
|
||||
internalIsFlyout = false;
|
||||
|
||||
/** Is this workspace the surface for a flyout? */
|
||||
isFlyout = false;
|
||||
get isFlyout(): boolean {
|
||||
return this.internalIsFlyout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this workspace the surface for a mutator?
|
||||
* @internal
|
||||
*/
|
||||
isMutator = false;
|
||||
internalIsMutator = false;
|
||||
|
||||
/** Is this workspace the surface for a mutator? */
|
||||
get isMutator(): boolean {
|
||||
return this.internalIsMutator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `true` if the workspace is currently in the process of a bulk
|
||||
|
||||
Reference in New Issue
Block a user