View Panel attributes

54 views
Skip to first unread message

charles peguiron

unread,
Jul 17, 2012, 11:25:34 AM7/17/12
to simile-...@googlegroups.com
Hello,

I'm working with Exhibit 3 Scripted.

When I build my HTTP page, I trying to specify which view is to display by default.

I tried to modify the initialView attribute but it doesn't change anything.
Here is the different syntaxes I tried:

<div id="panel" data-ex-role="exhibit-viewPanel" data-ex-initialView=1>...._my_views_...</div>
OR
<div id="panel" data-ex-role="exhibit-viewPanel" data-ex-initialView="1">
OR
<div id="panel" data-ex-role="exhibit-viewPanel" data-ex-initial-view="1">
OR
<div id="panel" data-ex-role="exhibit-viewPanel" ex:initialView=1>
...

I looked at the examples but I can't find one that use this attribute.

Is that functionality working well for somebody? If it is the case can I have an example please?

Best regards,

Charles

Ryan Lee

unread,
Jul 18, 2012, 5:34:31 PM7/18/12
to simile-...@googlegroups.com
Hi Charles,

This one should have worked:

<div id="panel" data-ex-role="exhibit-viewPanel" data-ex-initial-view="1">

But looking deeper, it appears there's a bug. Exhibit.getAttribute was
expected to always return a string, though the underlying jQuery call
"makes every effort to convert it to a typed value", so in this case it
was returning an integer.

I've modified getAttribute in the repository to better handle always
returning a string. If you're working with a clone off GitHub, make a
pull; it won't be available on the hosted code server until some future
date.

Also, if you're not already, you may want to temporarily add:

<div data-ex-role="exhibit-controlPanel"
data-ex-developer-mode="true"></div>

to your file so you can use the history reset widget, which may also be
interfering with your ability to see changes take shape (by always
taking over and setting the view to whatever you looked at last).

charles peguiron

unread,
Jul 23, 2012, 4:23:39 AM7/23/12
to simile-...@googlegroups.com
Hi Ryan,

Thanks to you, the  attribut "initial-view" is working very well now!

The tip about "developper-mode" will be really usefull for me!! I was always closing/opening windows before. Simply click on this widget will change my life!

Thanks you for this too.

Best regards,

Charles
Reply all
Reply to author
Forward
0 new messages