Skip to content

cannot drag a horizontal or vertical line shape #1532

Open
@vttrifonov

Description

@vttrifonov

I have a simple editable plot with a horizontal line shape like so

plot_ly() %>%
  layout(
  shapes=list(
    type = "line",  line = list(color = "red"),
    x0 = 0,  x1 = 1, xref="paper",
    y0 = 0, y1 = 0
  )
) %>%
config(editable=TRUE)

My problem is that I cannot drag the line shape. It just does not register (e.g. the pointer always stays a cross-hair and never converts to a hand) no matter how slowly or closely I try to point to the red line: when I click it always zooms and never drags the line. Even if I zoom this to the nano-scale the red line just never gets detected. The weird thing is that if I make this a slanted line (y0=0, y1=1), the problem goes away and I can drag the line shape without problem.

I am doing this from the plot viewer in RStudio, but even within an app it does not work.

I know this will be ascribed to idiosyncrasies of my set-up (I took this code more or less verbatim from an example on dragging a vertical line; this example also does not work for me), so please tell me what about my set-up (see below for details about this) could be causing this. It is very annoying as I really need this basic feature (it is more or less why I decided I will switch to plotly for what I want to do), but at the moment am stuck at this seemingly simple roadblock.

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /.automount/apps/GNU/R/3.5.1_conda/lib/R/lib/libRblas.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] plotly_4.9.0 ggplot2_3.1.1 promises_1.0.1 shiny_1.2.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 pillar_1.3.1 compiler_3.5.1 later_0.8.0 plyr_1.8.4 tools_3.5.1 digest_0.6.18 viridisLite_0.3.0 jsonlite_1.6 tibble_2.1.1
[11] gtable_0.3.0 pkgconfig_2.0.2 rlang_0.3.4 rstudioapi_0.10 crosstalk_1.0.0 yaml_2.2.0 l1000_1.0 withr_2.1.2 dplyr_0.8.0.1 httr_1.4.0
[21] htmlwidgets_1.3 grid_3.5.1 tidyselect_0.2.5 glue_1.3.1 data.table_1.12.2 R6_2.4.0 tidyr_0.8.3 purrr_0.3.2 magrittr_1.5 scales_1.0.0
[31] htmltools_0.3.6 assertthat_0.2.1 mime_0.6 xtable_1.8-3 colorspace_1.4-1 httpuv_1.5.1 lazyeval_0.2.2 munsell_0.5.0 crayon_1.3.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions