Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleSlider.js



First of all thank you for the help Julian.

I have tried what you said and it still giving me the same results. 
Here is the snip-lets that make up the volume slider

CSS (just like you said)
#volumeSlider {
-apple-dashboard-region: dashboard-region(control rectangle);
}

html
<div class='volumeSlider' id='volumeSlider' style='position: absolute;top: 75px; left: 40px; bottom: 75px;'></div>

.js
volumeSlider = new AppleVerticalSlider(document.getElementById("volumeSlider"), volumeAdjust);
if (volumeSlider)
{
document.getElementById("volumeSlider").display = "block";
}

Sorry for being a pain on this, I would really like to know where I am going wrong.

thanks,
Rob


On Nov 29, 2005, at 6:06 PM, Julian Missig wrote:

This is what you should have in your CSS for the widget you sent:

#volumeSlider {
-apple-dashboard-region: dashboard-region(control rectangle);
}

Julian


On 29 Nov 2005, at 17:42, Rob Crawford wrote:

I tried this, not sure if I got the css file right. Here is the 4 lines that I put in my css file but I get the same results.

.AppleSlider {
position: absolute;
-apple-dashboard-region: dashboard-region(control rectangle 0 0 0 0);
}


thanks,

Rob
On Nov 29, 2005, at 4:42 PM, Julian Missig wrote:

On 29 Nov 2005, at 16:28, Rob Crawford wrote:

I have been writing a widget which need 3 sliders, I have tried to use the sliders in the AppleSlider.js and I get them to work inside Safari and Widgetarium but in Dashboard they seem to have problems. The thumb will not drag you can click on the track to change the value of the slider but not the thumb. I am new to _javascript_ and I have found samples of other sliders but I would like to use the ones that Apple provides. Has anyone used the AppleSliders with success? If so is there a widget out there that uses them that I can look at.

It looks like there may be an issue with AppleSlider when the element it is given is absolutely-positioned. In this case the element AppleSlider creates which has the Dashboard region set on it is not sized properly, which means the slider is not marked as being a control.

The easiest workaround is to just set -apple-dashboard-region: dashboard-region(control rectangle); on the element you want to use (or from _javascript_ style.appleDashboardRegion = "dashboard-region(control rectangle)"; ). The other workaround is to use relatively-positioned elements.

This may also affect AppleScrollbar.

Julian




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden

References: 
 >AppleSlider.js (From: Rob Crawford <email@hidden>)
 >Re: AppleSlider.js (From: Rob Crawford <email@hidden>)
 >Re: AppleSlider.js (From: Julian Missig <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.