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

PR: LIBRARY: DnD: Survey-Elements #9542

Merged
merged 3 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/survey-core/entries/chunks/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export {
VerticalAlignment
} from "../../src/base-interfaces";
export { SurveyError } from "../../src/survey-error";
export { SurveyElementCore, SurveyElement, DragTypeOverMeEnum } from "../../src/survey-element";
export { SurveyElementCore, SurveyElement } from "../../src/survey-element";
export { CalculatedValue } from "../../src/calculatedValue";
export {
CustomError,
Expand Down
5 changes: 2 additions & 3 deletions packages/survey-core/src/dragdrop/core.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { SurveyModel } from "../survey";
import { Base, EventBase } from "../base";
import { IShortcutText, ISurvey, ISurveyElement } from "../base-interfaces";
import { DragTypeOverMeEnum } from "../survey-element";
import { EventBase } from "../base";
import { IShortcutText, ISurvey } from "../base-interfaces";
import { IDragDropEngine } from "./engine";
import { DragDropDOMAdapter, IDragDropDOMAdapter } from "./dom-adapter";
import { DomDocumentHelper } from "../global_variables_utils";
Expand Down
10 changes: 4 additions & 6 deletions packages/survey-core/src/panel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { property, propertyArray, Serializer } from "./jsonobject";
import { property, Serializer } from "./jsonobject";
import { HashTable, Helpers } from "./helpers";
import { ArrayChanges, Base } from "./base";
import {
Expand All @@ -15,7 +15,7 @@ import {
ISurvey,
IFindElement
} from "./base-interfaces";
import { DragTypeOverMeEnum, SurveyElement, RenderingCompletedAwaiter } from "./survey-element";
import { SurveyElement, RenderingCompletedAwaiter } from "./survey-element";
import { Question } from "./question";
import { ElementFactory, QuestionFactory } from "./questionfactory";
import { LocalizableString } from "./localizablestring";
Expand All @@ -27,9 +27,8 @@ import { CssClassBuilder } from "./utils/cssClassBuilder";
import { IAction } from "./actions/action";
import { ActionContainer } from "./actions/container";
import { SurveyModel } from "./survey";
import { AnimationGroup, IAnimationConsumer, IAnimationGroupConsumer } from "./utils/animation";
import { AnimationGroup, IAnimationGroupConsumer } from "./utils/animation";
import { DomDocumentHelper, DomWindowHelper } from "./global_variables_utils";
import { PageModel } from "./page";
import { PanelLayoutColumnModel } from "./panel-layout-column";

export class QuestionRowModel extends Base {
Expand Down Expand Up @@ -271,7 +270,6 @@ export class QuestionRowModel extends Base {
private getRenderedWidthFromWidth(width: string): string {
return Helpers.isNumber(width) ? width + "px" : width;
}
@property({ defaultValue: null }) dragTypeOverMe: DragTypeOverMeEnum;
public dispose(): void {
super.dispose();
this.stopLazyRendering();
Expand Down Expand Up @@ -2004,7 +2002,7 @@ export class PanelModelBase extends SurveyElement<Question>
}
}

// TODO: remove it or not?
// creator dragdrop usage
public dragDropFindRow(findElement: ISurveyElement): QuestionRowModel {
if (!findElement || findElement.isPage) return null;
var element = <IElement>findElement;
Expand Down
11 changes: 0 additions & 11 deletions packages/survey-core/src/survey-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,6 @@ export abstract class SurveyElementCore extends Base implements ILocalizableOwne
public abstract getProcessedText(text: string): string;
}

// TODO: rename
export enum DragTypeOverMeEnum {
InsideEmptyPanel = 1,
MultilineRight,
MultilineLeft,
Top, Right, Bottom, Left
}

/**
* A base class for all survey elements.
*/
Expand Down Expand Up @@ -201,9 +193,6 @@ export class SurveyElement<E = any> extends SurveyElementCore implements ISurvey
private textProcessorValue: ITextProcessor;
private selectedElementInDesignValue: SurveyElement = this;

@property({ defaultValue: null }) dragTypeOverMe: DragTypeOverMeEnum;
@property({ defaultValue: false }) isDragMe: boolean;

public readOnlyChangedCallback: () => void;

private static IsNeedScrollIntoView(el: HTMLElement, checkLeft: boolean, scrollIfVisible?: boolean) {
Expand Down