[OpenLayers-Trac] Re: [OpenLayers] #2946: Panel: New icons and new
displayClass for use with panels.
OpenLayers
trac-20090302 at openlayers.org
Mon Mar 14 19:09:49 EDT 2011
#2946: Panel: New icons and new displayClass for use with panels.
------------------------------------------+---------------------------------
Reporter: jorix | Owner: jorix
Type: feature | Status: new
Priority: minor | Milestone: 2.11 Release
Component: Control.Panel | Version: 2.10
Keywords: CSS displayClass Panel icons | State: Needs More Work
------------------------------------------+---------------------------------
Comment(by jorix):
Replying to [comment:2 marcjansen]:
> Hi jorix,
>
> thanks a lot for your contribution.
Great! Tomorrow afternoon I start work on this.
> I have a few remarks:
> * When adding {{{.olPanelIconsLeft}}} to the panel, the
> controls appear in reversed order which feels strange and unexpected
to me.
> From the name one would expect that only the panel changes the
position,
> right? I suggest renaming the class to e.g.
{{{.olPanelIconsReversed}}}
Yes, I agree.
> * Could you please update the other examples you mentioned so that
they look
> functional with your patch applied? I only had a look at {{{snap-
split.html}}}
> and that looked broken.
ok
> * It would be great to have the possible CSS-classes documented
> in {{{OpenLayers.Control.Panel::initialize()}}}
I'll try to do it and a link to the example, but my English is bad.
> * Do you think it is possible to enhance the styles for the CSS class
> {{{olPanelIconsLeft}}} so that the class is a drop in replacement for
> {{{.olPanelIcons}}}? Do you see a chance of getting rid of the need to
add
> two classes?
I agree with the proposal to use only one class (and as
{{{.olPanelIconsReversed}}}) I will work on it. But now I'm not sure get
it, and that CSS is not too dirty.
> If not, the documentation of
> {{{OpenLayers.Control.Panel::initialize()}}} should clearly indicate
how to
> reorder panel items (At least a link to the example would be
appropriate)
ok, if I can not do with one class, I will document the use of two
classes.
> * If it is possible, it would be very nice if you could explain the
> positioning of the panels in the example with visible CSS-code
ok
> * As you provide a "blank" panel background-image
> ({{{olControlItemInactive}}}) you might enhance the example with code
that
> shows how to add simple custom icons using the CSS property
{{{content}}},
> e.g.
> {{{
> div.olControlItemInactive:after {
> content: "?";
> text-align: center;
> font-size: 14px;
> font-weight: bold;
> margin-left: 8px;
> }
> }}}
It's interesting. But I think I have a better proposal:
Months ago I wrote code to create icons '''with text and white
background''' (on and off) The icons are re sized to the width of the text
or {{{<img />}}} (using {{{OpenLayers.Util.getRenderedDimensions()}}}).
It is not published because it depends on #2862 (uses new {{{panelIcon}}}
property)
Do you think about this proposal?
NOTE: The white icon is designed for not filing an icon when not properly
reported a displayClass in a control.
> * You have a typo in the example: it says {{{olPanelIconsVertival}}}
instead
> of {{{olPanelIconsVertical}}} once
oops! ok
> * Could you update the patch so it applies at current trunk?
Yes, yes! :-)
--
Ticket URL: <http://trac.openlayers.org/ticket/2946#comment:3>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list