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

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

From: Edward O'Connor <eoconnor@apple.com>
Date: Thu, 05 Jul 2012 09:40:41 -0700
To: whatwg@lists.whatwg.org
Message-id: <m2pq8af9fa.fsf@eoconnor.apple.com>
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 16:41:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:09 GMT