shiny icon indicating copy to clipboard operation
shiny copied to clipboard

Double redraws for brush

Open jcheng5 opened this issue 6 years ago • 2 comments

I'm seeing this with 108-module-output. After brushing one of the plots, you get two redraws, not one. It looks like the restoring of the brush sends very slightly different coordinates. Probably we should use not quite so many significant digits...

RECV {"method":"update","data":{"scatters-brush":{"xmin":15.654357184498,"xmax":21.369862814924,"ymin":22.591599977322,"ymax":30.113859997532,"coords_css":{"xmin":177.5500030517578,"xmax":280.5500030517578,"ymin":164,"ymax":241},"coords_img":{"xmin":253.00874588251108,"xmax":399.7837409710884,"ymin":233.69999217987075,"ymax":343.4249885082247},"img_css_ratio":{"x":1.4249999523162846,"y":1.424999952316285},"mapping":{"colour":"selected_","x":"cty","y":"hwy"},"domain":{"left":7.7,"right":36.3,"bottom":10.4,"top":45.6},"range":{"left":48.7397254003237,"right":783.191781083199,"bottom":521.260274599676,"top":7.80821891680156},"log":{"x":null,"y":null},"direction":"xy","brushId":"scatters-brush","outputId":"scatters-plot1"}}}

RECV {"method":"update","data":{"scatters-brush":{"xmin":15.654357184501,"xmax":21.369862814926,"ymin":22.591599977322,"ymax":30.113859997532,"coords_css":{"xmin":177.5500030518,"xmax":280.5500030518,"ymin":164,"ymax":241},"coords_img":{"xmin":253.0087458825712,"xmax":399.7837409711485,"ymin":233.69999217987075,"ymax":343.4249885082247},"img_css_ratio":{"x":1.4249999523162846,"y":1.424999952316285},"mapping":{"colour":"selected_","x":"cty","y":"hwy"},"domain":{"left":7.7,"right":36.3,"bottom":10.4,"top":45.6},"range":{"left":48.7397254003237,"right":783.191781083199,"bottom":521.260274599676,"top":7.80821891680156},"log":{"x":null,"y":null},"direction":"xy","brushId":"scatters-brush","outputId":"scatters-plot1"}}}

jcheng5 avatar Feb 28 '19 01:02 jcheng5

Observed on RStudio 1.2, Windows 10, R 3.5.2, with Chrome and Edge.

jcheng5 avatar Feb 28 '19 01:02 jcheng5

Currently working on a pull request that will solve this and other brush-related issues at https://github.com/dvg-p4/shiny

dvg-p4 avatar Jul 01 '22 18:07 dvg-p4