Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Fix scroll bugs with vertical scrollbar #2228

Merged
merged 20 commits into from
Oct 25, 2016

Conversation

yotamberk
Copy link
Contributor

No description provided.

Copy link
Member

@Tooa Tooa left a comment

Choose a reason for hiding this comment

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

Looks good to me. I'm not sure about the braces. I usually prefer to have them even for single line commands. However, it looks like sometimes they are added and sometimes they are omitted.

}

function onMouseScrollSide(event) {
var current = this.scrollTop;
var adjusted = -current;
if (!me.options.verticalScroll) return;
Copy link
Member

Choose a reason for hiding this comment

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

You should add curly braces here in order to be consistent with the code style.

@@ -1070,6 +1072,7 @@ Core.prototype._onPinch = function (event) {
* @private
*/
Core.prototype._onDrag = function (event) {
if (!event) return
Copy link
Member

Choose a reason for hiding this comment

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

Add curly braces and missing ;. See my comment above.

@@ -109,6 +104,11 @@ function Timeline (container, items, groups, options) {
// current time bar
this.currentTime = new CurrentTime(this.body);
this.components.push(this.currentTime);

// apply options
if (options) {
Copy link
Member

Choose a reason for hiding this comment

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

Here we have the braces. Is this some Javascript style convention to omit them if it's a return? I'm not sure.

@@ -390,6 +390,8 @@ Range.prototype._onDragStart = function(event) {
* @private
*/
Range.prototype._onDrag = function (event) {
if (!event) return
Copy link
Member

Choose a reason for hiding this comment

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

See above.

Copy link
Member

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

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

I think in case of only a "return" we don't have to force curly brackets. It's just tast!
@yotamberk Do you want to change it or leave it? Should I merge?

@yotamberk
Copy link
Contributor Author

@mojoaxel I kind of prefer without the curly braces. But it is a question of style. I think you can accept it like this. If we decide later differently, i'll be glad to change it.

@mojoaxel mojoaxel merged commit 33795a9 into almende:develop Oct 25, 2016
@yotamberk yotamberk deleted the vertical-scroll branch October 28, 2016 09:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants