mirror of
https://github.com/google/blockly.git
synced 2026-01-10 10:27:08 +01:00
* Fix error conditions for setParent #4989 * Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list. * Commented out error for when calling `a.setParent(null)` if a is connected to superior block. * Adjusted comment to reflect that blocks were no longer being disconnected in this method. * Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`). * Fix error conditions for setParent #4989 * Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list. * Error now thrown when calling `a.setParent(null)` if a is connected to a superior block. * Adjusted comment to reflect that blocks were no longer being disconnected in this method. * Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`). * Fix error conditions for setParent #4989 * Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list. * Commented out error for when calling `a.setParent(null)` if a is connected to superior block. * Adjusted comment to reflect that blocks were no longer being disconnected in this method. * Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`). * Fixed lint errors. * Fix error conditions for setParent google#4989 * Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list. * Commented out error for when calling `a.setParent(null)` if a is connected to superior block. * Adjusted comment to reflect that blocks were no longer being disconnected in this method. * Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`). * Fixed lint errors. * Adjusted comment. * Removed unnecessary set to null/added tests * One is failing (commented out), will investigate later * Lint fix * Removed failing test that correctly fails * Update comments to conform to style guide Capitalize first letter, period at end