ufal / perl-pmltq-web

Simple web build on the top of the PML Tree Query server
https://lindat.mff.cuni.cz/services/pmltq/
0 stars 0 forks source link

clicking a node does not center it in the tree view #85

Open Ansa211 opened 7 years ago

Ansa211 commented 7 years ago

query type: w/o Filters the top bar shows a list of nodes from the query, each marked with a different colour

It would be great if clicking any of these nodes would place the tree so that the node is at its center - or, even better, optimize the view in the following order of priorities:

  1. the node itself is visible,
  2. maximum number of other nodes in the query are visible,
  3. maximum number of the node's ancestors and descendants are visible,
  4. as big a part of the tree as possible is visible.
matyaskopp commented 7 years ago
  1. related to https://github.com/ufal/perl-pmltq-web/issues/17
  2. It is possible
  3. svg tree does not contain tree structure - it contains: - edges, - node points, - white rectangle behind labels, - node labels. There is no tree relation among these elements
  4. related to https://github.com/ufal/perl-pmltq-web/issues/19 - zoom out
matyaskopp commented 6 years ago

create minimal bounding rectangle with some margins and zoom to this rectangle with maximum zoom ratio of some constant (3-5 ?)