mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
style(reorder-group): remove underscores
This commit is contained in:
@ -39,9 +39,9 @@ export class ReorderGroup {
|
|||||||
private containerTop: number;
|
private containerTop: number;
|
||||||
private containerBottom: number;
|
private containerBottom: number;
|
||||||
|
|
||||||
@State() _enabled = false;
|
@State() enabled = false;
|
||||||
@State() _iconVisible = false;
|
@State() iconVisible = false;
|
||||||
@State() _actived = false;
|
@State() activated = false;
|
||||||
|
|
||||||
@Element() private el: HTMLElement;
|
@Element() private el: HTMLElement;
|
||||||
|
|
||||||
@ -52,13 +52,13 @@ export class ReorderGroup {
|
|||||||
@Watch('disabled')
|
@Watch('disabled')
|
||||||
protected disabledChanged(disabled: boolean) {
|
protected disabledChanged(disabled: boolean) {
|
||||||
if (!disabled) {
|
if (!disabled) {
|
||||||
this._enabled = true;
|
this.enabled = true;
|
||||||
this.dom.raf(() => {
|
this.dom.raf(() => {
|
||||||
this._iconVisible = true;
|
this.iconVisible = true;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this._iconVisible = false;
|
this.iconVisible = false;
|
||||||
setTimeout(() => this._enabled = false, 400);
|
setTimeout(() => this.enabled = false, 400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ export class ReorderGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
for (let i = 0, ilen = children.length; i < ilen; i++) {
|
for (let i = 0; i < children.length; i++) {
|
||||||
const child = children[i];
|
const child = children[i];
|
||||||
sum += child.offsetHeight;
|
sum += child.offsetHeight;
|
||||||
heights.push(sum);
|
heights.push(sum);
|
||||||
@ -127,7 +127,7 @@ export class ReorderGroup {
|
|||||||
|
|
||||||
this.lastToIndex = indexForItem(item);
|
this.lastToIndex = indexForItem(item);
|
||||||
this.selectedItemHeight = item.offsetHeight;
|
this.selectedItemHeight = item.offsetHeight;
|
||||||
this._actived = true;
|
this.activated = true;
|
||||||
|
|
||||||
item.classList.add(ITEM_REORDER_SELECTED);
|
item.classList.add(ITEM_REORDER_SELECTED);
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ export class ReorderGroup {
|
|||||||
this.lastToIndex = toIndex;
|
this.lastToIndex = toIndex;
|
||||||
|
|
||||||
hapticSelectionChanged();
|
hapticSelectionChanged();
|
||||||
this._reorderMove(fromIndex, toIndex);
|
this.reorderMove(fromIndex, toIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update selected item position
|
// Update selected item position
|
||||||
@ -162,7 +162,7 @@ export class ReorderGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onDragEnd() {
|
private onDragEnd() {
|
||||||
this._actived = false;
|
this.activated = false;
|
||||||
const selectedItem = this.selectedItemEl;
|
const selectedItem = this.selectedItemEl;
|
||||||
if (!selectedItem) {
|
if (!selectedItem) {
|
||||||
return;
|
return;
|
||||||
@ -215,7 +215,7 @@ export class ReorderGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/********* DOM WRITE ********* */
|
/********* DOM WRITE ********* */
|
||||||
private _reorderMove(fromIndex: number, toIndex: number) {
|
private reorderMove(fromIndex: number, toIndex: number) {
|
||||||
const itemHeight = this.selectedItemHeight;
|
const itemHeight = this.selectedItemHeight;
|
||||||
const children = this.containerEl.children;
|
const children = this.containerEl.children;
|
||||||
const transform = CSS_PROP.transformProp;
|
const transform = CSS_PROP.transformProp;
|
||||||
@ -251,9 +251,9 @@ export class ReorderGroup {
|
|||||||
hostData() {
|
hostData() {
|
||||||
return {
|
return {
|
||||||
class: {
|
class: {
|
||||||
'reorder-enabled': this._enabled,
|
'reorder-enabled': this.enabled,
|
||||||
'reorder-list-active': this._actived,
|
'reorder-list-active': this.activated,
|
||||||
'reorder-visible': this._iconVisible
|
'reorder-visible': this.iconVisible
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user