Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #23255

Re: How to detect key pressed plus mouse click, e.g., ctrl + left click

Message-ID <2926855.hZBUqkaNbn@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2014-02-23 23:48 +0100
Subject Re: How to detect key pressed plus mouse click, e.g., ctrl + left click
Newsgroups comp.lang.javascript
References (2 earlier) <tn9fg95v13j6c51bjs89qidr75s5kttk3g@4ax.com> <XnsA2DBD0E11E61Eeejj99@194.109.133.133> <LaidnWADIL12nJXOnZ2dnUVZ_i2dnZ2d@westnet.com.au> <3506285.IpskKQNfjB@PointedEars.de> <26292757.AuDnbMLnkA@PointedEars.de>

Show all headers | View raw


Thomas 'Ingrid' Lahn wrote:

>     getFeature: function (obj, path) {
>       var realPath = path;
>       var start = 0;
> 
>       if (!_isArray(realPath))
>       {
>         realPath = arguments;
>         start = 1;
>       }
> 
>       for (var i = start, len = realPath.length; i < len; i++)
>       {
>         var component = realPath[i];
>         if (_isObject(obj)
>             && typeof obj[component] != "undefined" && obj[component])
>         {
>           obj = obj[component];
>         }
>         else
>         {
>           return void 0;
>         }
>       }
> 
>       return obj;
>     }
> 
> […]
> _______
> ¹ On a side note, I have also noticed that it already supports
>   false-values.  It does not support “undefined” and “null” values yet,
>   but I do not think this is a problem: I for one would consider
>   “undefined” and “null” to be an indication that the feature on that
>   property path is not available.

Ignore that.  It does not support “undefined” and “null”, which is fine with 
me so far, but it also does not support other false-values like “false” and 
“0”.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to detect key pressed plus mouse click, e.g., ctrl + left click "Joey@still_Learning.invalid" <Joey@still_Learning.invalid> - 2014-02-21 10:45 -0800
  Re: How to detect key pressed plus mouse click, e.g., ctrl + left click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-21 20:04 +0100
    Re: How to detect key pressed plus mouse click, e.g., ctrl + left click "Joey@still_Learning.invalid" <Joey@still_Learning.invalid> - 2014-02-21 11:21 -0800
      Re: How to detect key pressed plus mouse click, e.g., ctrl + left click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-21 20:32 +0100
        Re: How to detect key pressed plus mouse click, e.g., ctrl + left click "Joey@still_Learning.invalid" <Joey@still_Learning.invalid> - 2014-02-21 14:24 -0800
          Re: How to detect key pressed plus mouse click, e.g., ctrl + left click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-22 00:31 +0100
            Re: How to detect key pressed plus mouse click, e.g., ctrl + left click "Joey@still_Learning.invalid" <Joey@still_Learning.invalid> - 2014-02-21 17:41 -0800
        Re: How to detect key pressed plus mouse click, e.g., ctrl + left click Andrew Poulos <ap_prog@hotmail.com> - 2014-02-22 12:48 +1100
          Re: How to detect key pressed plus mouse click, e.g., ctrl + left click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-22 10:36 +0100
          Re: How to detect key pressed plus mouse click, e.g., ctrl + left click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-22 10:54 +0100
            Re: How to detect key pressed plus mouse click, e.g., ctrl + left click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-22 11:19 +0100
              Re: How to detect key pressed plus mouse click, e.g., ctrl + left click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-22 11:27 +0100
                Re: How to detect key pressed plus mouse click, e.g., ctrl + left click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-22 11:39 +0100
                Re: How to detect key pressed plus mouse click, e.g., ctrl + left click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-22 12:50 +0100
                Re: How to detect key pressed plus mouse click, e.g., ctrl + left click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-22 12:56 +0100
                Re: How to detect key pressed plus mouse click, e.g., ctrl + left click John Harris <niam@jghnorth.org.uk.invalid> - 2014-02-23 14:00 +0000
            Re: How to detect key pressed plus mouse click, e.g., ctrl + left click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-23 23:48 +0100
              Re: How to detect key pressed plus mouse click, e.g., ctrl + left click Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-02-23 20:04 -0300
            Re: How to detect key pressed plus mouse click, e.g., ctrl + left click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-23 23:39 +0100

csiph-web