thanks David, that worked like a charm.
to give some background to my next question: i have a popup with
shows graphs of the utilisation of router ports. i would like to be
able to control the time range of these graphs with a drop down list
using the standard html <select><option/></select> and some backend
javascript.
however, because the bubble closes if you click anywhere within it,
the drop down list becomes useless as the bubble closes as soon as i
let go of the mouse.
is there an option to only close the bubble when the 'close' icon is
clicked on within the bubble?
also, for the type of information that i am presenting, it is useful
to have multiple popup bubbles with different content within each
one. is this possible within exhibit?
thanks,
Yee.
On 25 Jul 2007, at 06:32, David Huynh wrote:
> Yee-Ting Li wrote:
>> great, thanks David - that helped a lot.
>>
>> on a related matter, is there a way i can define the size of the
>> popup? because i'm including graphs in the popup bubble, they are
>> often larger than the default size of the popup and hence i have to
>> scroll to see them...
>>
> Yee, unfortunately there is no setting for that in version 1.0 (there
> will be in 2.0). For now, you can override the size with some
> javascript
> code that you include after you include exhibit-api.js.
>
> <script>
> Exhibit._Impl.prototype.showItemInPopup = function(itemID, elmt) {
> var coords = SimileAjax.DOM.getPageCoordinates(elmt);
> var bubble = SimileAjax.Graphics.createBubbleForPoint(
> document,
> coords.left + Math.round(elmt.offsetWidth / 2),
> coords.top + Math.round(elmt.offsetHeight / 2),
> 400, // px
> 300 // px
> );
>
> var itemLensDiv = document.createElement("div");
> var itemLens = new Exhibit.Lens(itemID, itemLensDiv, this,
> this._configuration);
> bubble.content.appendChild(itemLensDiv);
> };
> </script>
>
>
> You can change where it says 400 and 300.
>
> Cheers,
>
> David
>> cheers,
>>
>> Yee.
>>
>> On 20 Jul 2007, at 18:57, David Huynh wrote:
>>
>>
>>> Yee-Ting Li wrote:
>>>
>>>> Hi David,
>>>>
>>>> thanks for the reply. i'm not too fussed about duplicating data at
>>>> the moment, so your first suggestion is a good one. once we get
>>>> to a
>>>> production system for our exhibit'd data, then we will consider
>>>> using
>>>> version 2... unless there are features in version 2 which may be
>>>> useful to us now... ;)
>>>>
>>>> unfortunately, due to the security sensitive nature of the data we
>>>> are presenting, we can not provide you a url of our exhibit. :(
>>>>
>>>> One feature of exhibit that i do like is the popup lenses that work
>>>> on the thumbnail views. is there a way i can make this work on the
>>>> Tabular view? ie if we click on a particular cell, then it will
>>>> bring
>>>> up a bubble of other data. i've tried just copy and pasting the
>>>> relevant code into the Exhibit.TabularView for a ex:role="exhibit-
>>>> lens", but it doesn't work :(
>>>>
>>>>
>>> What you need to do is declare the value type of the property (in
>>> that
>>> column) to be "item". So you data file will look something like
>>> this,
>>> if, say, your data is about products and manufacturers:
>>>
>>> {
>>> items: [
>>> { "label": "Segway",
>>> "type" : "Product",
>>> "manufactured-by" : "Segway Inc.",
>>> "sold-at" : "Walmart"
>>> },
>>> { "label": "Segway Inc.",
>>> "type": "Company"
>>> },
>>> { "label": "Walmart",
>>> "type": "Company"
>>> }
>>> ],
>>> properties: {
>>> "manufactured-by" : {
>>> valueType: "item"
>>> },
>>> "sold-at" : {
>>> valueType: "item"
>>> }
>>> }
>>> }
>>>
>>>
>>>> also i'm not completely sure of the syntax of the lens reference:
>>>> does the <span ex:content="value".> always create a link to the
>>>> popup
>>>> of the definition <div ex:role="exhibit-lens">? what if i want more
>>>> than one type of popup on the same page?
>>>>
>>>>
>>> Many lens templates can be defined for different item types, e.g.,
>>>
>>> <div ex:role="exhibit-lens" ex:itemTypes="Product"> ... </div>
>>>
>>> <div ex:role="exhibit-lens" ex:itemTypes="Company"> ... </div>
>>>
>>> Version 2.0 will be more flexible.
>>>
>>> Hope that helps,
>>>
>>> David
>>>
>>> _______________________________________________
>>> General mailing list
>>> [email protected]
>>> http://simile.mit.edu/mailman/listinfo/general
>>>
>>
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://simile.mit.edu/mailman/listinfo/general
>>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general