-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Dates as dates #1078
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
Dates as dates #1078
Changes from 1 commit
d4bb89d
9e27955
00138aa
9784b3b
1db4448
5ff9722
c045bc5
3dd294f
451ee24
9ccde7e
51a0563
5ccd083
e63ea3b
2e9dbad
37d52fe
55b313c
b7121c3
03b4a0c
dd0940a
f629f71
a29ce33
065ac8a
4a0a866
7679483
0d61fcc
5e11571
d807259
05c762d
1b0e133
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -579,21 +579,21 @@ function drawOne(gd, index, opt, value) { | |
ann.call(Lib.setTranslate, xcenter, ycenter); | ||
|
||
update[annbase + '.x'] = xa ? | ||
(options.x + dx / xa._m) : | ||
xa.l2r(xa.p2l(xa.l2p(xa.r2l(options.x)) + dx)) : | ||
((arrowX + dx - gs.l) / gs.w); | ||
update[annbase + '.y'] = ya ? | ||
(options.y + dy / ya._m) : | ||
ya.l2r(ya.p2l(ya.l2p(ya.r2l(options.y)) + dy)) : | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you tested shapes under There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested. Editable shapes on date axes work just fine ✅ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh interesting... didn't even know they were editable but yes, seems to work 👍 |
||
(1 - ((arrowY + dy - gs.t) / gs.h)); | ||
|
||
if(options.axref === options.xref) { | ||
update[annbase + '.ax'] = xa ? | ||
(options.ax + dx / xa._m) : | ||
xa.l2r(xa.p2l(xa.l2p(xa.r2l(options.ax)) + dx)) : | ||
((arrowX + dx - gs.l) / gs.w); | ||
} | ||
|
||
if(options.ayref === options.yref) { | ||
update[annbase + '.ay'] = ya ? | ||
(options.ay + dy / ya._m) : | ||
ya.l2r(ya.p2l(ya.l2p(ya.r2l(options.ay)) + dy)) : | ||
(1 - ((arrowY + dy - gs.t) / gs.h)); | ||
} | ||
|
||
|
@@ -640,13 +640,13 @@ function drawOne(gd, index, opt, value) { | |
var csr = 'pointer'; | ||
if(options.showarrow) { | ||
if(options.axref === options.xref) { | ||
update[annbase + '.ax'] = xa.p2l(xa.l2p(options.ax) + dx); | ||
update[annbase + '.ax'] = xa.l2r(xa.p2l(xa.l2p(xa.r2l(options.ax)) + dx)); | ||
} else { | ||
update[annbase + '.ax'] = options.ax + dx; | ||
} | ||
|
||
if(options.ayref === options.yref) { | ||
update[annbase + '.ay'] = ya.p2l(ya.l2p(options.ay) + dy); | ||
update[annbase + '.ay'] = ya.l2r(ya.p2l(ya.l2p(ya.r2l(options.ay)) + dy)); | ||
} else { | ||
update[annbase + '.ay'] = options.ay + dy; | ||
} | ||
|
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.
wild
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.
can you factor that out into something like:
or a better name.
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.
blocking change
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.
maybe I'll just make
ax.r2p
andax.p2r
, which I just omitted because I didn't have a use case for it for a while, but now there are a couple of places that use it.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.
Sounds good!
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.
d807259