| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi Chuck, You can use the Stretcher example to get to the correct size before the transition. Since the Stretcher has a callback for a completed stretch, you can do the following: 1) info button click starts the stretch 2) stretch to desired size; stretch callback performs transition function flipClick (event) { if (!stretcher.isStretched()) { stretcher.> stretcher.stretch(); } else { showPrefs(); } } function showPrefs () { if (window.widget) { window.widget.prepareForTransition("ToBack"); } document.getElementById("front").style.display = "none"; document.getElementById("back").style.display = "block"; if (window.widget) { setTimeout("window.widget.performTransition()", 0); } } When going back to the front, you can do a delayed "shrink" that will go back to the appropriate front height after the front transition is complete, like below. This is a little sketchy because it assumes a specific time interval for the transition to be performed. There is already an enhancement request for a "transitionFinished" notification which would make this less sketchy. function goToFront () { if (window.widget) { window.widget.prepareForTransition("ToFront"); } document.getElementById("back").style.display = "none"; document.getElementById("front").style.display = "block"; var stretcherTimeout = 0; if (window.widget) { setTimeout("window.widget.performTransition();", 0); stretcherTimeout = 800; // give some time for the transition } if (stretcher. showPrefs && stretcher.isStretched()) { // We stretched in order to show the prefs; shrink back when the front is shown stretcher.> setTimeout("stretcher.stretch();", stretcherTimeout); } } ---------------------------------------------- Matt Drance DTS Engineer Java - Dashboard - Address Book On Nov 4, 2005, at 2:09 PM, Chuck Soper wrote:
|
_______________________________________________ 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: | |
| >increasing height during back to front transition (From: Chuck Soper <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.