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

List item menu #1929

Open
wants to merge 78 commits into
base: master
Choose a base branch
from
Open

List item menu #1929

wants to merge 78 commits into from

Conversation

thibaultzanini
Copy link
Contributor

@thibaultzanini thibaultzanini commented Jan 20, 2018

No description provided.

@@ -1371,6 +1374,7 @@ var TranslateComposer = exports.TranslateComposer = Composer.specialize(/** @len
translateEvent.initCustomEvent("translate", true, true, null);
translateEvent.translateX = this._translateX;
translateEvent.translateY = this._translateY;
translateEvent.targetElement = this.element;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to workaround the fact that today the target is the translate composer itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

this.disabled = !hasLeftButtons && !hasRightButtons;
}

this._setButtonBoundaries(this._rightButtons, 'marginLeft');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is modifying the DOM in wilDraw, could it be moved at the beginning of draw instead?

var hasLeftButtons = this._leftButtons && this._leftButtons.length > 0,
hasRightButtons = this._rightButtons && this._rightButtons.length > 0;

this._updateButtonPositions();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is modifying the DOM in wilDraw, could it be moved at the beginning of draw instead?

dragElementStyle[ListItemMenu.cssTransition] = 'none';

// Hide not sliding options.
if (isLeftSideOpened) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use .toggle() instead?

@thibaultzanini
Copy link
Contributor Author

@marchant PR updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants