List of articles   choose language


Scheme, count



Agreements

tagattributecharacteristicstyle
new html-keywordslinealingpointdefault
values of new html-keywordssideromb
old html-keywordstdidlist
values of old html-keywordscircle
communication xmlsoundsyncpower
values of communication xmlnouser
keyboard and mouser commandenter

Line

Fasten broken line to objects

Let's look at typical situation of drafting database scheme.

We put "City" and "Street" in cells of invisible table to set them in page.

Street
idStreet
idCity (FK)
name
City
idCity
name

It's required to fasten a broken line to tables.

I offer to enter tags line , ld (origin of designations: ld = line division) and pack with attribute host , which equal to attribute id of tag td.

<table>
  <tr>
    <td></td>
    <td>
      <table id="id1">
        <caption> Street      </caption>
        <tr><td>  idStreet    </td></tr>
        <tr><td>  idCity (FK) </td></tr>
        <tr><td>  name        </td></tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
      <table id="id2">
        <caption> City   </caption>
        <tr><td>  idCity </td></tr>
        <tr><td>  name   </td></tr>
      </table>
    </td>
    <td></td>
  </tr>
</table>

<line>
  <pack host="id1" align="side">
  <pack host="id2" dot="last" align="side">
  <ld x="0" y="0"></ld>
  <ld x="0" y="50"></ld>
  <ld x="100" y="50"></ld>
  <ld x="100" y="100"></ld>
</line>

Broken line is scaled during fastening to 2 objects.

Tag pack ties a point of broken line to object (in this case - to table). Identifier id (if it's absent - serial number, counted from one) of a tied point is specified in attribute dot. Special values of attribute dot are first and last, which specifies, that first or last point of broken line should be tied.

It's possible to fasten broken line (using tag pack) not only for the ends, but also for two intermediate points, or for end and intermediate points.


If there is no ld inside tag line, then objects are connected by one direct line.

Alignment

Characteristic align of tag pack specifies, where the end of tied section will be located, and accepts one of the following values: side (default value), center, into. Dotted line shows an invisible part of a section.

side center into

Half-tied broken line

If broken line has only one tag pack, then broken line is not scaled and is tied to object only by its one point. In this case broken line is drawn so, that its axis "Ox" goes horizontal from left to right, and its axis "Oy" goes vertically from below to top.

coordinates line,
consist of one section
location of line
in html-document

Not tied broken line

If broken line has hot tag pack, then broken line is not scaled. In this case tag line can be only inside tag pic (origin of designations: pic = picture).

<pic>
  <line> ... </line>
</pic>

Such broken line is specified in local coordinate system of picture pic, axes "Ox" and "Oy" go from left bottom corner of picture.

If characteristic reper (having coordinates of left bottom corner of picture) of tag pic is specified, then all points and sections, located more left or below than left bottom corner, are invisible. If attribute is not specified, then the most left and the most top points of all broken lines, located inside tag pic, lay accordingly on top and on right picture border.

If characteristic range (having coordinates of right top corner of picture) of tag pic is specified, then all points and sections, located more right or top than right top corner, are invisible. If attribute is not specified, then the most right and the highest points of all broken lines, located inside tag pic, lay accordingly on right and on top picture border.

Characteristics reper and range can have negative values. Coordinates of broken line points, values of attributes reper and range are specified in millimeters (fractional part of number is separated from natural part by mark "point", length of display diagonal is set in adjustments of a browser).

pic {
  reper=100.5 200.5;
  range=200.5 400.5;
}

Tags pic can be enclosed into each other.

Put object into point of broken line

Any objects can be located in a broken line point (we name their enclosed objects further)

Location of object centre comparatively line point is still specified in characteristic align, but this characteristic must be used in tag ld. Putting object into point of broken line allows to make complex constructions

and putting in cascade - to make very complex constructions, for example database schemes



Case, when object, located in a point, may cover (including cover after drag-and-drop) other objects, is regulated by characteristic push of tag ld. Value yes in any tag ld means, that objects, intersecting with it, must be moved automatically by browser in a direction, which is clear in the following pictures. Default value is no.

Note for browser developers.

It's bad to allow any objects to have attributes "x", "y", and reason is following. All objects should be grouped into layers (i.e. into broken lines), and even such objects, which are a dump, should be placed inside invisible broken line (you can name this broken line as "heap", "dump", etc.).

Explanatory inscriptions

Explanatory inscriptions for points and sections are specified in attributes point-note and section-note of tag ld. Location of inscription is clear in the following pictures.


If you need to put any text inside broken line (more precisely: in geometrical centre of points of broken line), you must put tag contour with attribute text inside tag line. Tag contour has characteristics color, white-space and all characteristics of group font.

contour {
  color=lime
}
<line>
 <ld>
 ...
 <ld>
 <contour text="open">
</line>
contour {
  white-space=pre
}
<line>
 <ld>
 ...
 <ld>
 <contour text="p1 7.28
p2 1.93
p3 5.02">
</line>

Closed, painted over

Assignment any colours to characteristic background-color of tag contour results to painting over a line by the specified colour (it's convenient to write minerals, chisels, military objects on a map). Default value null means, that value, specified in surrounding tag, is applied.

Only internal area of self-crossing line are painted over.

If two polygons (closed, painted over broken lines) are intersected in result of server or user command, than a place of their intersecting are painted over by "average" colour.

Count can have several tags contour. Assignment a colour to characteristic background-color paint over only one contour of count.

Roalover

Help, which pop-up, when mouse is over points and section, is defined in attributes point-title and section-title of tag ld. If roalover help for a point is not specified, then browser shows coordinates of point as roalover help.

Fasten broken line to broken line

It's necessary to specify identifier id (if it's absent - serial number) of point of other broken line in attribute ptr of tag pack for that. Special values of attribute ptr are first and last, which specifies, that it's need to fasten to first or last point of other broken line.

If broken line has only one tag pack, i.e. is half-tied, then it can be rotated by specification a new location in attribute angle of tag pack.

angle=median
angle=m
angle=antimedian
angle=am


Resume

Tags
pic, line, ld, pack, contour


Attributes
tag attribute default value list of possible values
pack host   object_id
dot   point_id, point_serial_number, first, last
ptr   point_id, point_serial_number, first, last
angle null median (m), antimedian (am)
ld point-note, section-note   any text
ld (line) point-title, section-title   any text
contour text   any text


Characteristics
tag characteristic default value list of possible values
pack align side side, center, into
ld (line) align side side, center, into
push no yes, no
contour background-color null black, maroon, green, olive, navy, purple, teal, gray, silver, red, lime, yellow, blue, fuchsia, aqva, white, gold, orange, violet, indigo, #FFFFFF
color black
pic reper null float float
range null float float


Database support

Geographical maps, GML

Tag <link type="point"> can be inside of tag line. If file "a.txt" has following contents

0 0
0 50
100 50
100 100
the example in article beginning can be written so
<line>
 <link src="./a.txt" type="point">
 <pack host="id1" align="side">
 <pack host="id2" dot="last" align="side">
</line>

You find advantage for figure, like given below.

<line>
 <link src="./a.txt" type="point">
</line>

In third field there is - specially for a forms with broken line - unique identifier of broken line point (usual, not necessarily it is number): primary key or serial number.

0 0 7
0 50 h21
100 50 5
100 100 8

Fourth field prolongs to end of string and contains (probably through a blanks) html-tags (or text), which should be placed in a point.

Counts

Second file should be specified in attribute <link type="section"> for drawing a count. File contains a table in the same format: one string - one record, fields are divided by spaces (blanks).

<line>
 <link src="./a.txt" type="point">
 <link src="./b.txt" type="section">
 <pack host="id1" align="side">
 <pack host="id2" dot="last" align="side">
</line>
a.txt
72  250 4       NH
317 182 anyword OH
581 42  7       Na <sup> + </sup>
b.txt
4 7 1  triple red
4 5 ab wedge

First table specifies coordinates of count points and contains records of following fields: coordinate "x" of point, coordinate "y" of point, unique identifier of point, html-tags, which should be placed in point.

Second table specifies count bonds and contains records of following fields: unique identifier of initial point, unique identifier of final point, unique identifier of section, fourth field prolongs to end of string and contains values of several section characteristics through a blanks (browser understand name of section characteristic by value of characteristic).

Presence of tag <link type="section"> means, that bonds will be drawn not by way of following.

Standard examples of count are a structural chemical formulas.

Explanatory inscriptions

Explanatory inscriptions of beginning and end of sections are defined in characteristics section-parent and section-child of tag ld.

ld {
  section-parent: "parent";
  section-child:  "child";
}
Location of inscriptions is clear in the following picture.

Explanatory inscriptions inside contours

If it's necessary to put explanatory inscriptions in any contours


of count
then tags contour, in which a file of contour points and inscription are specified, are placed inside tag line for each explained contour.
<line>
 <contour src="./c1.txt" text="open">
 <contour src="./c2.txt" text="any">
 <contour src="./c3.txt" text="some">
</line>

File of contour points is specified as one-column-table in a textual file, file name is specified in attribute src of tag contour. Points identifiers are listed consistently in this column. It's unimportant, whether any section passes between two next points or not - inscription are in geometrical centre of points.

c1.txt
2 
4 
7 
8 
11 
15 

If tag <link type="section"> is absent, then attribute src of first tag contour is ignored (contour is whole broken line), and rest tags contour are ignored.



Resume

Attributes
tag attribute default value list of possible values
link type   point, section



Characteristics

Each tag ld (except for last) responds both for a point and for a section (last tag ld - only for a point).

All characteristics can be specified both for tag ld , and for tag line .


Characteristic color specifies text colour in a point and equal black by default.

Group of characteristics POINT

When contents of tag ld are empty, its characteristic point-type specifies, what geometrical figure will be drawn in a point (this charactetistic is similarly to characteristic list-style-type). Usual values of point-type are: none (default value), disc, circle, square, decimal. I offer to add: arrow (arrow in section end), barrow (backarrow, arrow in section beginning), botharrow (arrows in two section ends), star (asterisk), romb (rhombus), triangle (triangle), hex (hexagon), which will be necessary for writing scientific diagrams. And browser always draws whole (not half ! ) geometrical figure.

Characteristic point-color specifies colour of geometrical figure in a point. By default it's equal black.

Group of characteristics SECTION

Characteristic section-color specifies colour of broken line section. By default it's equal black.

Characteristic section-width specifies thickness of section in millimeters (fractional part of number is separated from natural by mark "point") and accepts also special values thin (default value), medium, thick.

Characteristic section-type specifies type of broken line section and accepts values: null (none) - invisible section, dotted, dashed, solid (default value), double (may be railway), groove, ridge. I offer to add value single as equal to solid, and also values wedge, bwedge, dwedge, bdwedge for drawing any out-going and in-coming line (they are necessary each time, when it's necessary to show, that some lines leave a plane of figure).

triple
wedge
(if section-type=thin, then thin-to-medium,
if section-type=medium, then medium-to-thick, etc)
bwedge
(backwedge,
if section-type=thin, then medium-to-thin,
if section-type=medium, then thick-to-medium, etc)
dwedge
(dottedwedge, wedge & dotted)
bdwedge
(backdottedwedge, backwedge & dotted)

Characteristics section are similar to characteristics of border group. And they are not depend of characteristic background-color.



Resume

Characteristics
tag characteristic default value list of possible values
ld ( line ) point-type null null (none), disc, circle, square, decimal, arrow, barrow, botharrow, star, romb, triangle, hex
point-color black black, maroon, green, olive, navy, purple, teal, gray, silver, red, lime, yellow, blue, fuchsia, aqva, white, gold, orange, violet, indigo, #FFFFFF
color - || - - || -
section-color - || - - || -
section-type solid null (none), dotted, dashed, single (solid), double, groove, ridge, triple , wedge , bwedge , dwedge , bdwedge
section-width thin thin, medium, thick, float



Forms with lines and maps

Tag line can be located inside tag form. Behaviour of broken lines under commands is the same as behaviour of all other html-objects, but only lines have:

Point and section of same unit can be written by two different styles after command, that is completely normal.


Styles specifications may be empty. It's necessary when equally represented broken lines are different semantically.

line.a {}
line.b {}

It's important to remember, that a point styles with the same name may be not equivalent.

line.a ld.x {color:red}
line.b ld.x {color:blue}

New points oordinates are sent in parameters x and y. Summary (total) displacement of point are sent after many movings.

Last moved point (and object in it) or section lay over all others (inside tag layer, certainly).

Assignment value yes to characteristic user-xy of tag ld results to sending two additional attributes user-x and user-y in action section.


Drag-and-drop of object, enclosed in a point, is drag-and-drop of point.

If an enclosed object has changed style under commands, then tag ld does not change style.


Broken line (counts) sends unique identifiers of two html-tags:

Origin of designations: num = number, os = old style (state), ns = new style (state), cmd = command.


Moment of sending is described in separate document.

Work with points

click

Click on a point sends XML-text

<dot name=A cmd=click os=... ns=... num=N>

Usually programmer defines style ns in css-file for this case (form is sent on pressing button "submit"), because click on a point usually means a choice of a point.


There exist characteristic deformation for tag ld, by default equal yes. If it's no, then drag-and-drop only one point is impossible - two adjacent (neighbouring) sections go together, without changing angle between them.

double

Double-click on a point send XML-text

<dot name=A cmd=double os=... ns=... num=N>

Usually programmer does not define style ns in css-file for a this case (form is sent immediately), because double-click on a point usually means insert any text (for example, "NH") into a point instead of geometrical figure, immediately new html-page arises with textbox-widget "input-text".

right-click

Click by right key ("right" click) on a point means occurrence menu for the point, in which user chooses a new point states (new style for a point). The XML-text is sent

<dot name=A cmd=... os=... ns=... num=N>

Point menu is set in atribute point-menu of tags ld or line.

If style ns is not found in css-file, then sense of menu element is another - that is choice of some operation for a point.

drag

New coordinates of drag-and-dropped point are sent as the following XML-text and always on pressing button "submit".

<dragdot name=A num=N x=... y=...>

Drag-and-drog is very convenient to guess of points coordinates. If points coordinates are given in a separate file

<line>
  <link src="./a.txt" type="point">
</line>
and user keep a document in browser ("File" -> "Save as..."), then browser must edit coordinates of drag-and-drop'ed points in this file.

If a points coordinates are in html-document, then new coordinates of drag-and-drop'ed points can be found out during sending them from a form.

If point has got upon other point (of this or other broken line, of this or other picture) - further we shall name it as accepting point, then browser sends additional XML-text

<dropdot name=A num=N onname= onnum= >
where onname and onnum - type and identifiers of accepting point. One point has got upon another, if an objects, located in them, are crossed. If an
enclosed object covers several other enclosed objects after moving point, then browser chooses object, nearest to mouse cursor, as accepting object.

drop

Look at previous paragraph

<dragdot name=A1 num=N1                             x=  y=  >
<dot     name=A1 num=N1                    cmd=drag os= ns= >
<dropdot name=A1 num=N1 onname=A2 onnum=N2>
<dot                    name=A2   num=N2   cmd=drop os= ns= >

Work with sections

click

Click on a section sends following XML-text for the section point

<section name=A cmd=click os=... ns=... num=N>
<section name=A cmd=click os=... ns=... num=N user-x=... user-y=...>

Usually programmer defines style ns in css-file for this case (form is sent on pressing button "submit"), because click on a section usually means a choice of a section.

double

Double-click on a section sends XML-text for the section point

<section name=A cmd=double os=... ns=... num=N>
<section name=A cmd=double os=... ns=... num=N user-x=... user-y=...>

Usually programmer does not define style ns in css-file for this case (form is sent immediately), because double-click on a section usually means cutting it and creation new point in a place of click. Immediately occurs same, but updated html-page with a new point.

right-click

Click by right key ("right" click) on a section means occurrence menu for the section, in which user chooses a new section states (new style for a section). The XML-text is sent

<section name=A cmd=... os=... ns=... num=N>
<section name=A cmd=... os=... ns=... num=N user-x=... user-y=...>

Section menu is set in atribute section-menu of tags ld or line.

If style is not found in css-file, then sense of menu element is another - that is choice of some operation for a section.

drag

Section goes during drag-and-drop by parallel carrying. Form sends new coordinates of two points.

<dragdot name=A num=N   x=... y=...>
<dragdot name=A num=N+1 x=... y=...>

Two variants are possible, depending on value of characteristic move of tag ld :

dot cross

If two points are combined into one, then second point (on following inside tag line) receives coordinates (null, null) and form sends following XML text

<dragdot name=A num=N  x=... y=...>
<deldot  name=A num=N+1>

Form is always sent on pressing button "submit".

Drag-and-drog is very convenient to guess of points coordinates.

Work with polygon

click, double, right click

Click, double-click, right-click inside contour of

results, that form sends following XML-text.
<line name=A cmd=... os=... ns=...>
<line name=A cmd=... os=... ns=... user-x=... user-y=...>

If click by mouse right key, then attribute menu is used for tag line (instead of point-menu or section-menu).

drag

Drag-and-drop with pressing mouse inside contour of

means dragging all figure wholly without deformations. It's not necessarily to define characteristic deformation. Form sends XML-text, given below. Summary (total) displacement is sent after many movements.

<dragline name=A dx=... dy=...>

Resume

Attributes
tag attribute
ld ( line) point-menu , section-menu , menu


Characteristics
tag characteristic default value list of possible values
ld ( line) deformation yes yes, no
user-xy no yes, no
move dot dot, cross


Movements
<dot      name= cmd= os= ns=  num= >
<section  name= cmd= os= ns=  num= user-x= user-y= >
<line     name= cmd= os= ns=       user-x= user-y= >
<dragdot  name=      x=  y=   num= >
<dropdot  name=               num= onname= onnum= >
<dragline name=      dx= dy= >
<deldot   name=               num= >



html60author



List of articles   choose language


Используются технологии uCoz