Skip to content

List item menu - #1929

Open
thibaultzanini wants to merge 78 commits into
montagejs:masterfrom
thibaultzanini:list-item-menu
Open

List item menu#1929
thibaultzanini wants to merge 78 commits into
montagejs:masterfrom
thibaultzanini:list-item-menu

Conversation

@thibaultzanini

@thibaultzanini thibaultzanini commented Jan 20, 2018

Copy link
Copy Markdown
Contributor

No description provided.

translateEvent.initCustomEvent("translate", true, true, null);
translateEvent.translateX = this._translateX;
translateEvent.translateY = this._translateY;
translateEvent.targetElement = this.element;

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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