Skip to content
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

Setting hugging parent to fixed is optional when converting to absolute #4354

Merged
merged 11 commits into from
Oct 12, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ import { isNotYetStartedDragInteraction } from './interaction-state'
import { keyboardAbsoluteMoveStrategy } from './strategies/keyboard-absolute-move-strategy'
import { absoluteResizeBoundingBoxStrategy } from './strategies/absolute-resize-bounding-box-strategy'
import { keyboardAbsoluteResizeStrategy } from './strategies/keyboard-absolute-resize-strategy'
import { convertToAbsoluteAndMoveStrategy } from './strategies/convert-to-absolute-and-move-strategy'
import {
convertToAbsoluteAndMoveAndSetParentFixedStrategy,
convertToAbsoluteAndMoveStrategy,
} from './strategies/convert-to-absolute-and-move-strategy'
import { absoluteDuplicateStrategy } from './strategies/absolute-duplicate-strategy'
import type { BuiltInDependencies } from '../../../core/es-modules/package-manager/built-in-dependencies-list'
import type { StateSelector } from 'zustand'
Expand Down Expand Up @@ -85,6 +88,7 @@ const moveOrReorderStrategies: MetaCanvasStrategy = (
keyboardAbsoluteMoveStrategy,
keyboardReorderStrategy,
convertToAbsoluteAndMoveStrategy,
convertToAbsoluteAndMoveAndSetParentFixedStrategy,
reorderSliderStategy,
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ describe('finds an applicable strategy for the nearest ancestor', () => {
runTest(codeElementWithSibling, pathForShallowNestedElement, (editor) => {
const strategies = editor.getEditorState().strategyState.sortedApplicableStrategies

expect(strategies?.length).toEqual(2)
expect(strategies?.length).toEqual(3)
if (strategies == null) {
// here for type assertion
throw new Error('`strategies` should not be null')
Expand Down
Loading