Select to view content in your preferred language

TOC v2.5 - shrinking space between legend and layer name?

641
2
06-13-2012 03:09 PM
ChristinaLaurier
Occasional Contributor
Hi again,

Still working on some formatting issues.
I have noticed that our sub-layer names within some map services are very long and run into the TOCmenu (transparency, collapse all, description, etc).

In the TocItemRenderer.as:

-I changed
            // UI component spacing
     private static const PRE_CHECKBOX_GAP:Number = 5;     // changed to 2

     private static const POST_CHECKBOX_GAP:Number = 4;  //changed to 1

=================================================================================

I have also found the spot to decrease the space between the legend symbol and the layer label

In TocItemRenderer.as
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
if (_group && _group.numElements > 0 && _group.visible)
   {
    _group.setActualSize(_group.contentWidth, _group.contentHeight);
    _group.x = startx;
    _group.y = (_group.height > 0)?(unscaledHeight - _group.height) / 2 : 4;
    startx = _group.x + 30 + POST_CHECKBOX_GAP;
===============================================================================
Unfortunately, changing the value less than 30 does not work for our application because some symbols need this amount of space.

How would I go about removing the extra TocMenu (i.e. collapse/expand all, transparency,  move down, description)?
Tags (2)
0 Kudos
2 Replies
ChristinaLaurier
Occasional Contributor
Got it,

Just removed the TocLayerMenu.mxml  & then commented out errors
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Christina,

   Hmmm... why didn't you just increase the width of the widget.

Robert
0 Kudos