chird / meteoJS

Javascript Library for meteorological and atmospheric tools
Apache License 2.0
25 stars 6 forks source link

add only one horizontal line (isobar) inside thermodynamicDiagram and move it by mouse #62

Closed HadjerSahariYassir closed 2 years ago

HadjerSahariYassir commented 2 years ago

Hi, i'm asking to create a straight line above ThermodinamicDiagram at any position and move it with mouse , i tried to make it inside the div but sometimes my line stopped when i click on some elements inside the diagram that fire the event mouseEvent .

Qs : is there a way or method that draw a line (one isobar) and let the possibility to move it ?

chird commented 2 years ago

Hi, there's an API option. You can do something like that:

td =  new ThermodynamicDiagram({
  'diagram': {
    'hoverLabels': {
      'pres': {
        'length': '100%'
      }
    }
  }
});

This will add a horizontal isobar line moving with the mouse. It is combined with the hover label for the pressure level. (for details see API)

HadjerSahariYassir commented 2 years ago

yes true, it's working , i will read about it more. Also i should do the same for isotherms (one isotherm ) moved by hovering. so is that possible by this library. Thanks