Message from discussion
setTimeout in a less Ghetto fashion
Received: by 10.101.27.36 with SMTP id e36mr858379anj.35.1273206170118;
Thu, 06 May 2010 21:22:50 -0700 (PDT)
X-BeenThere: mootools-users@googlegroups.com
Received: by 10.101.174.37 with SMTP id b37ls5718370anp.6.p; Thu, 06 May 2010
21:22:47 -0700 (PDT)
Received: by 10.100.24.21 with SMTP id 21mr6713530anx.27.1273206167212;
Thu, 06 May 2010 21:22:47 -0700 (PDT)
Received: by 10.100.24.21 with SMTP id 21mr6713529anx.27.1273206167172;
Thu, 06 May 2010 21:22:47 -0700 (PDT)
Return-Path: <hazl...@gmail.com>
Received: from mail-qy0-f193.google.com (mail-qy0-f193.google.com [209.85.221.193])
by gmr-mx.google.com with ESMTP id j16si2901698ann.0.2010.05.06.21.22.46;
Thu, 06 May 2010 21:22:46 -0700 (PDT)
Received-SPF: pass (google.com: domain of hazl...@gmail.com designates 209.85.221.193 as permitted sender) client-ip=209.85.221.193;
Received: by mail-qy0-f193.google.com with SMTP id 31so1202031qyk.25
for <mootools-users@googlegroups.com>; Thu, 06 May 2010 21:22:46 -0700 (PDT)
Received: by 10.224.35.3 with SMTP id n3mr7603782qad.169.1273206165820;
Thu, 06 May 2010 21:22:45 -0700 (PDT)
Return-Path: <hazl...@gmail.com>
Received: from MatthewPC (d-216-246-154-237.cpe.metrocast.net [216.246.154.237])
by mx.google.com with ESMTPS id 23sm1068524qyk.15.2010.05.06.21.22.44
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Thu, 06 May 2010 21:22:44 -0700 (PDT)
From: "Matthew Hazlett" <hazl...@gmail.com>
To: <mootools-users@googlegroups.com>
References: <5d48bc4f-3f1b-4dd4-a89d-73d6d82f0b19@e1g2000yqe.googlegroups.com> <5c6808f9-285c-4253-95aa-a293349b9211@r34g2000yqj.googlegroups.com> <y2v9d53b7851005061156z474701f1r20be8ec92c725dc9@mail.gmail.com> <j2p18ce12851005061311ie26836deob21148914aa80c00@mail.gmail.com> <4ad413ec-3847-414a-bf9f-1cdac6414cf8@q32g2000yqb.googlegroups.com> <000001caed68$2397e7e0$6ac7b7a0$@com> <w2kf85bfa101005061512h37d34737l5082b18ce4513578@mail.gmail.com>
In-Reply-To: <w2kf85bfa101005061512h37d34737l5082b18ce4513578@mail.gmail.com>
Subject: RE: [Moo] Re: setTimeout in a less Ghetto fashion
Date: Fri, 7 May 2010 00:21:45 -0400
Message-ID: <000a01caed9c$ceb0ba10$6c122e30$@com>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcrtaVeR3tOMUIH/QhWC9TtaOKCJ5wAMw4uA
X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com:
domain of hazl...@gmail.com designates 209.85.221.193 as permitted sender)
smtp.mail=hazl...@gmail.com; dkim=pass (test mode) header...@gmail.com
X-Original-Sender: hazl...@gmail.com
Reply-To: mootools-users@googlegroups.com
Precedence: list
Mailing-list: list mootools-users@googlegroups.com; contact
mootools-users+owners@googlegroups.com
List-ID: <mootools-users.googlegroups.com>
List-Post: <http://groups.google.com/group/mootools-users/post?hl=en_US>,
<mailto:mootools-users@googlegroups.com>
List-Help: <http://groups.google.com/support/?hl=en_US>, <mailto:mootools-users+help@googlegroups.com>
List-Archive: <http://groups.google.com/group/mootools-users?hl=en_US>
Sender: mootools-users@googlegroups.com
List-Unsubscribe: <http://groups.google.com/group/mootools-users/subscribe?hl=en_US>,
<mailto:mootools-users+unsubscribe@googlegroups.com>
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000B_01CAED7B.479F1A10"
Content-language: en-us
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01CAED7B.479F1A10
Content-Type: text/plain;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Dunno, if it's more elegant, but it's in a class:
http://www.jsfiddle.net/JCMkv/
=20
Its more mooish, still needs work but it uses the ideas I was thinking =
about. You can change the time between fades in the mousemove function.
=20
Hopefully it gives you a starting point.
=20
From: mootools-users@googlegroups.com =
[mailto:mootools-users@googlegroups.com] On Behalf Of Andr=C3=A9 Fiedler
Sent: Thursday, May 06, 2010 6:13 PM
To: mootools-users@googlegroups.com
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion
=20
Does not detect mouse move...
2010/5/7 Matthew Hazlett <hazl...@gmail.com>
How about this:
http://www.jsfiddle.net/G5Geb/
There was really no need for all those events, you just need the one.
-----Original Message-----
From: mootools-users@googlegroups.com
[mailto:mootools-users@googlegroups.com] On Behalf Of jiggliemon
Sent: Thursday, May 06, 2010 5:06 PM
To: MooTools Users
Subject: [Moo] Re: setTimeout in a less Ghetto fashion
http://www.jsfiddle.net/Y8Phj/12/
Placing two times outs seems to cut down on the load.
It's a bit ugly.
But baring some other way to set a delay, it will suffice.
I've got a mouseMoveTimeout, set to a relatively low time, bypassing
the pixel to pixel call, spreading out the move event.
And the og Timeout, to check for the mouse in-activity.
Is this the best way to accomplish such a task?
-Chase
On May 6, 1:11 pm, Eneko Alonso <eneko.alo...@gmail.com> wrote:
> Your example, Fabio, does not fade out the menu when the mouse is
inactive...
>
> Here is the original code, with a little of
cleanup.http://www.jsfiddle.net/Y8Phj/8/
>
> You can also use the delay() method.
>
> 2010/5/6 F=C3=A1bio M. Costa <fabiomco...@gmail.com>:
>
>
>
> > You could do this:
>
> >http://www.jsfiddle.net/Y8Phj/7/
>
> > --
> > F=C3=A1bio Miranda Costa
> > Solucione Sistemas
> > Engenheiro de interfaces
> > Twitter: fabiomiranda
>
> > On Thu, May 6, 2010 at 3:49 PM, jiggliemon <ch...@agroism.com> =
wrote:
>
> >> Cleaned up the code a little more,
> >> and removed the console logs.
>
> >>http://www.jsfiddle.net/Y8Phj/4/
>
> >> -Chase
>
> >> On May 6, 11:43 am, jiggliemon <ch...@agroism.com> wrote:
> >> > I'm trying to achieve this "Menu fade on inactive mouse" effect =
like
> >> > you see in VLC player and the new Quicktime. Does anyone take =
issue
> >> > with how it's done in the example?
>
> >> > Please tell me there's a better mootools way.
>
> >> >http://www.jsfiddle.net/Y8Phj/3/
>
> >> > -Chase
>
> --
> Eneko Alonso
> Software Engineerhttp://enekoalonso.com
> San Luis Obispo, California
=20
------=_NextPart_000_000B_01CAED7B.479F1A10
Content-Type: text/html;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Dunno, if it's more elegant, but it's in a =
class:<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>http://www.jsfiddle.net/JCMkv/<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Its more mooish, still needs work but it uses the ideas I =
was thinking
about.=C2=A0 You can change the time between fades in the mousemove =
function.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hopefully it gives you a starting =
point.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt =
0in 0in 0in'>
<p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
mootools-users@googlegroups.com
[mailto:mootools-users@googlegroups.com] <b>On Behalf Of </b>Andr=C3=A9 =
Fiedler<br>
<b>Sent:</b> Thursday, May 06, 2010 6:13 PM<br>
<b>To:</b> mootools-users@googlegroups.com<br>
<b>Subject:</b> Re: [Moo] Re: setTimeout in a less Ghetto =
fashion<o:p></o:p></span></p>
</div>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'>Does not detect =
mouse move...<o:p></o:p></p>
<div>
<p class=3DMsoNormal>2010/5/7 Matthew Hazlett <<a
href=3D"mailto:hazl...@gmail.com">hazl...@gmail.com</a>><o:p></o:p></p=
>
<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'>How about this:<br>
<a href=3D"http://www.jsfiddle.net/G5Geb/" =
target=3D"_blank">http://www.jsfiddle.net/G5Geb/</a><br>
<br>
There was really no need for all those events, you just need the =
one.<br>
<br>
-----Original Message-----<br>
From: <a =
href=3D"mailto:mootools-users@googlegroups.com">mootools-users@googlegrou=
ps.com</a><br>
[mailto:<a =
href=3D"mailto:mootools-users@googlegroups.com">mootools-users@googlegrou=
ps.com</a>]
On Behalf Of jiggliemon<br>
Sent: Thursday, May 06, 2010 5:06 PM<br>
To: MooTools Users<br>
Subject: [Moo] Re: setTimeout in a less Ghetto fashion<br>
<br>
<a href=3D"http://www.jsfiddle.net/Y8Phj/12/" =
target=3D"_blank">http://www.jsfiddle.net/Y8Phj/12/</a><br>
Placing two times outs seems to cut down on the load.<br>
It's a bit ugly.<br>
But baring some other way to set a delay, it will suffice.<br>
<br>
I've got a mouseMoveTimeout, set to a relatively low time, bypassing<br>
the pixel to pixel call, spreading out the move event.<br>
And the og Timeout, to check for the mouse in-activity.<br>
<br>
Is this the best way to accomplish such a task?<br>
<br>
-Chase<br>
<br>
On May 6, 1:11 pm, Eneko Alonso <<a =
href=3D"mailto:eneko.alo...@gmail.com">eneko.alo...@gmail.com</a>>
wrote:<br>
> Your example, Fabio, does not fade out the menu when the mouse =
is<br>
inactive...<br>
><br>
> Here is the original code, with a little of<br>
cleanup.<a href=3D"http://www.jsfiddle.net/Y8Phj/8/" =
target=3D"_blank">http://www.jsfiddle.net/Y8Phj/8/</a><br>
><br>
> You can also use the delay() method.<br>
><br>
> 2010/5/6 F=C3=A1bio M. Costa <<a =
href=3D"mailto:fabiomco...@gmail.com">fabiomco...@gmail.com</a>>:<br>
><br>
><br>
><br>
> > You could do this:<br>
><br>
> ><a href=3D"http://www.jsfiddle.net/Y8Phj/7/" =
target=3D"_blank">http://www.jsfiddle.net/Y8Phj/7/</a><br>
><br>
> > --<br>
> > F=C3=A1bio Miranda Costa<br>
> > Solucione Sistemas<br>
> > Engenheiro de interfaces<br>
> > Twitter: fabiomiranda<br>
><br>
> > On Thu, May 6, 2010 at 3:49 PM, jiggliemon <<a
href=3D"mailto:ch...@agroism.com">ch...@agroism.com</a>> wrote:<br>
><br>
> >> Cleaned up the code a little more,<br>
> >> and removed the console logs.<br>
><br>
> >><a href=3D"http://www.jsfiddle.net/Y8Phj/4/" =
target=3D"_blank">http://www.jsfiddle.net/Y8Phj/4/</a><br>
><br>
> >> -Chase<br>
><br>
> >> On May 6, 11:43 am, jiggliemon <<a
href=3D"mailto:ch...@agroism.com">ch...@agroism.com</a>> wrote:<br>
> >> > I'm trying to achieve this "Menu fade on =
inactive mouse"
effect like<br>
> >> > you see in VLC player and the new Quicktime. =
Does
anyone take issue<br>
> >> > with how it's done in the example?<br>
><br>
> >> > Please tell me there's a better mootools way.<br>
><br>
> >> ><a href=3D"http://www.jsfiddle.net/Y8Phj/3/" =
target=3D"_blank">http://www.jsfiddle.net/Y8Phj/3/</a><br>
><br>
> >> > -Chase<br>
><br>
> --<br>
> Eneko Alonso<br>
> Software Engineerhttp://<a href=3D"http://enekoalonso.com" =
target=3D"_blank">enekoalonso.com</a><br>
> San Luis Obispo, California<o:p></o:p></p>
</div>
<p class=3DMsoNormal><o:p> </o:p></p>
</div>
</body>
</html>
------=_NextPart_000_000B_01CAED7B.479F1A10--