Skip to content
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

Moving node not working if covered by other unmovable node #5

Open
uranix opened this issue Sep 19, 2014 · 4 comments
Open

Moving node not working if covered by other unmovable node #5

uranix opened this issue Sep 19, 2014 · 4 comments

Comments

@uranix
Copy link

uranix commented Sep 19, 2014

Hello.

Please take a look at the following jsfiddle where a fixed dataset (drawn with lines) is covered by the same dataset (drawn with points, editable). There's no way to move points with mouse. Works well when datasets are reversed.
http://jsfiddle.net/sdrj2bsw/

I suppose it is due to early exit when looking up for point under mouse.

@jumjum123
Copy link
Owner

Hello Ivan,
could you please create an example in jsfiddle ?

regards
Jürgen

On Fri, Sep 19, 2014 at 2:04 PM, Ivan Tsybulin notifications@github.com
wrote:

Hello.

Please take a look at the following jsfiddle where a fixed dataset (drawn
with lines) is covered by the same dataset (drawn with points, editable).
There's no way to move points with mouse. Works well when datasets are
reversed.
http://jsfiddle.net/jumjum/jUrG7/

I suppose it is due to early exit when looking up for point under mouse.


Reply to this email directly or view it on GitHub
#5.

@uranix
Copy link
Author

uranix commented Sep 19, 2014

Sorry, here's the right example
http://jsfiddle.net/sdrj2bsw/

@uranix
Copy link
Author

uranix commented Sep 19, 2014

As a workaround one can override findItem method of series.nearBy option

series: { nearBy: {
  findItem: function (mouseX,mouseY,i,serie) {
    if (!serie.editable) return null;
    return findNearbyItemDefault(mouseX, mouseY, i, serie);
  }
} }

The updated fidlle is here: http://jsfiddle.net/sdrj2bsw/1/

@jumjum123
Copy link
Owner

Great, you found a solution.

Right now I'm working on another project (small ARM computer with SPI,I2C,
GPIO, ADC, DAC etc. with a kind of Javascript for processes,
www.espruino.com)
Therefore my time for flot is limited.

regards
Jürgen

On Fri, Sep 19, 2014 at 3:19 PM, Ivan Tsybulin notifications@github.com
wrote:

As a workaround one can override findItem method of series.nearBy option

series: { nearBy: {
findItem: function (mouseX,mouseY,i,serie) {
if (!serie.editable) return null;
return findNearbyItemDefault(mouseX, mouseY, i, serie);
}
} }

The updated fidlle is here: http://jsfiddle.net/sdrj2bsw/1/


Reply to this email directly or view it on GitHub
#5 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants