-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix pan issue #657 #2617
base: develop
Are you sure you want to change the base?
Fix pan issue #657 #2617
Conversation
lib/timeline/Timeline.js
Outdated
@@ -83,6 +83,9 @@ function Timeline (container, items, groups, options) { | |||
this.components = []; | |||
|
|||
this.body = { | |||
//moshe's code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment
lib/timeline/component/ItemSet.js
Outdated
// attach to the DOM | ||
|
||
|
||
// moshe's code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment
lib/timeline/component/ItemSet.js
Outdated
var newEnd = end + distance; | ||
} | ||
else | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brackets don't need a new line. should be } else {
lib/timeline/component/ItemSet.js
Outdated
|
||
if ((this.options.rtl && this.mouseLocation.mouseOnLeft)|| | ||
(!this.options.rtl && this.mouseLocation.mouseOnRight)) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for new line
lib/timeline/component/ItemSet.js
Outdated
if(props.item.data.end) itemWidth = props.item.data.end.valueOf() - props.item.data.start.valueOf(); | ||
start = windowEnd - itemWidth; | ||
} else | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for new line
lib/timeline/component/ItemSet.js
Outdated
} | ||
|
||
this.body.dom.leftZone.onmouseleave = this.body.dom.leftContainer.onmouseleave = function() | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for new line
lib/timeline/component/ItemSet.js
Outdated
} | ||
|
||
this.body.dom.rightZone.onmouseenter = this.body.dom.rightContainer.onmouseenter = function() | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for new line
lib/timeline/component/ItemSet.js
Outdated
} | ||
|
||
this.body.dom.rightZone.onmouseleave = this.body.dom.rightContainer.onmouseleave = function() | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for new line
lib/timeline/component/ItemSet.js
Outdated
this.body.dom.rightZone.onmouseleave = this.body.dom.rightContainer.onmouseleave = function() | ||
{ | ||
context.setMouseLeave(true); | ||
// context.setMouseOnRight(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
lib/timeline/component/ItemSet.js
Outdated
// context.setMouseOnRight(false); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment and empty lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the changes requested by @yotamberk Thanks!
45dd249
to
050dcf9
Compare
050dcf9
to
bfd8306
Compare
lib/timeline/Timeline.js
Outdated
@@ -83,6 +83,8 @@ function Timeline (container, items, groups, options) { | |||
this.components = []; | |||
|
|||
this.body = { | |||
getWindow: this.getWindow, | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this line.
lib/timeline/Core.js
Outdated
@@ -51,6 +51,8 @@ Core.prototype._create = function (container) { | |||
this.dom.shadowTopRight = document.createElement('div'); | |||
this.dom.shadowBottomRight = document.createElement('div'); | |||
this.dom.rollingModeBtn = document.createElement('div'); | |||
this.dom.leftZone = document.createElement('div'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a problem with these names. They are too generic. I think they should be renamed to: panningZoneLeft
and panningZoneRight
lib/timeline/component/ItemSet.js
Outdated
this.dragEvent = null; | ||
|
||
this.mouseLocation = {mouseOnLeft: false, mouseOnRight: false, mouseIsLeaving: false} | ||
var context = this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for this.
lib/timeline/component/ItemSet.js
Outdated
var context = this; | ||
|
||
this.setMouseOnLeft = function(isOn){ | ||
context.mouseLocation.mouseOnLeft = isOn; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use this
instead of context
lib/timeline/component/ItemSet.js
Outdated
|
||
this.dragEvent = null; | ||
|
||
this.mouseLocation = {mouseOnLeft: false, mouseOnRight: false, mouseIsLeaving: false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should not add another property referring to mouse properties. There is a this.touchParams
which contains all the mouse position props. I'd attach these properties to this.touchParams
instead of defining this.mouseLocation
The changes look fine but the tests are not passing =( |
@@ -83,6 +83,7 @@ function Timeline (container, items, groups, options) { | |||
this.components = []; | |||
|
|||
this.body = { | |||
getWindow: this.getWindow, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i should add this function to this.body because i want to get the range in itemSet module and this.body sent to itemSet constructor
|
||
} | ||
|
||
var context = this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove context
and use this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the context is needed to use setMouseOnLeft function in the mouse events for example: this.body.dom.panningZoneLeft.onmouseenter = function(){
context.setMouseOnLeft(true);
}
@mosheDa The check is failing, could you please look at it? Also, there are still outstanding review items to process. A resolution of these would be greatly appreciated. |
I am sorry I was busy for while. I am preparing to work on it as soon as
possible
בתאריך 6 ביולי 2017 22:24, "wimrijnders" <[email protected]> כתב:
… @mosheDa <https://github.com/mosheda> The check is failing, could you
please look at it? Also, there are still outstanding review items to
process. A resolution of these would be greatly appreciated.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2617 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AXZNdHxXB4Wp8ss6A8OFu9mHMt7gvZJSks5sLTR3gaJpZM4LrNmi>
.
|
Is this coming down the pike anytime soon? Would love to have this 👍 |
@mosheDa still waiting 😉 |
.panningZoneLeft{ | ||
left: 0; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove empty line
@mosheDa - are you looking for someone to carry these changes and finish this out for you? Or are you planning on continuing this work? |
This pull request fixes #657.