Как удалить стиль преобразования в перетаскиваемом элементе? ⇐ CSS
-
Anonymous
Как удалить стиль преобразования в перетаскиваемом элементе?
Using the example from CDK drag and drop, I want to add a preview of the dragged element with left and top positions without the transform style.
HTML
I can only be dragged within the dotted container Preview the dragged element TypeScript import {Component} from '@angular/core'; import {CdkDrag} from '@angular/cdk/drag-drop'; /** * @title Drag&Drop boundary */ @Component({ selector: 'cdk-drag-drop-boundary-example', templateUrl: 'cdk-drag-drop-boundary-example.html', styleUrls: ['cdk-drag-drop-boundary-example.css'], standalone: true, imports: [CdkDrag], }) export class CdkDragDropBoundaryExample {} Current state When you drag the element you have this div in DOM
I can only be dragged within the dotted container Expected result When you drag the element and click the preview button it should open the preview element which looks like this.
Now I can't be dragged, sorry Meaning the transform style should be replaced with left and top positions.
Источник: https://stackoverflow.com/questions/766 ... le-element
Using the example from CDK drag and drop, I want to add a preview of the dragged element with left and top positions without the transform style.
HTML
I can only be dragged within the dotted container Preview the dragged element TypeScript import {Component} from '@angular/core'; import {CdkDrag} from '@angular/cdk/drag-drop'; /** * @title Drag&Drop boundary */ @Component({ selector: 'cdk-drag-drop-boundary-example', templateUrl: 'cdk-drag-drop-boundary-example.html', styleUrls: ['cdk-drag-drop-boundary-example.css'], standalone: true, imports: [CdkDrag], }) export class CdkDragDropBoundaryExample {} Current state When you drag the element you have this div in DOM
I can only be dragged within the dotted container Expected result When you drag the element and click the preview button it should open the preview element which looks like this.
Now I can't be dragged, sorry Meaning the transform style should be replaced with left and top positions.
Источник: https://stackoverflow.com/questions/766 ... le-element
Мобильная версия