Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions centrallix/htmlgen/htdrv_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ static struct
int idcnt;
} HTMAP;

int htmapSetup(pHtSession s)
{
htrAddStylesheetItem(s, " div.wmap { VISIBILITY:inherit; POSITION:absolute; overflow:hidden; }\n");
return 0;
}
/*** htmapRender - generate the HTML code for the page.
***/
int htmapRender(pHtSession s, pWgtrNode map_node, int z)
Expand Down Expand Up @@ -104,7 +109,7 @@ int htmapRender(pHtSession s, pWgtrNode map_node, int z)
strtcpy(name, ptr, sizeof(name));

/** Add css item for the layer **/
htrAddStylesheetItem_va(s, "\t#map%POSbase { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; overflow: hidden; %STR}\n", id, x, y, w, h, z, main_bg);
htrAddStylesheetItem_va(s, "\t#map%POSbase { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; %STR}\n", id, x, y, w, h, z, main_bg);

htrAddWgtrObjLinkage_va(s, map_node, "map%POSbase", id);

Expand All @@ -128,7 +133,7 @@ int htmapRender(pHtSession s, pWgtrNode map_node, int z)
name, *osrc, osrc, !*osrc, allow_select, show_select, name);

/** HTML body <DIV> element to be used by the OpenLayers map. **/
htrAddBodyItem_va(s, "<DIV ID=\"map%POSbase\">\n", id);
htrAddBodyItem_va(s, "<DIV ID=\"map%POSbase\" class=div.wmap>\n", id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be class="wmap".


/** Check for widgets within the map. **/
htrRenderSubwidgets(s, map_node, z + 2);
Expand All @@ -153,6 +158,7 @@ int htmapInitialize()
/** Fill in the structure. **/
strcpy(drv->Name, "DHTML Map Driver");
strcpy(drv->WidgetName, "map");
drv->Setup = htmapSetup;
drv->Render = htmapRender;

htrAddEvent(drv, "MouseUp");
Expand Down