W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2012

Re: [whatwg] Removing hit regions without calling clearRect() or addHitRegion()

From: Charles Pritchard <chuck@jumis.com>
Date: Thu, 5 Jul 2012 11:34:45 -0700
Message-Id: <C57308BA-90A8-4991-AA56-DA43504DD2FA@jumis.com>
To: Edward O'Connor <eoconnor@apple.com>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>
There's also just removing the element from the DOM. Yes, I'd like a removeHitRegion(Element) feature; though I can skate by with the empty addHitRegion method.

I've not seen a response from you regarding the issues that Richard and Steve have brought up around the lightweight nodes feature-proposal. It seems relevant to the method signature of removeHitRegion.

On Jul 5, 2012, at 9:40 AM, Edward O'Connor <eoconnor@apple.com> wrote:

> Hi,
> Currently, there are only two ways to invoke the "clear regions that
> cover the pixels" algorithm: by calling either addHitRegion() or
> clearRect(). Authors should be able to explicitly remove a hit region as
> well, with a removeHitRegion(id) method.
> Consider a region of a canvas which the author would like to toggle
> between clickable and non-clickable states without drawing. Maybe
> they're indicating clickability by drawing a different outline around
> the region without actually redrawing the region itself, or perhaps
> there is no visible indication that the region's clickability is
> changing. Such an author should be able to straightforwardly achieve
> this without redrawing the region (as clearRect would require) and
> without installing a dummy hit region (as addHitRegion would require).
> Thanks,
> Ted
Received on Thursday, 5 July 2012 18:35:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:43 UTC