Developing ESTv2 -Event Delegation

Event Delegation

In ESTv2, a user may intuitively want to exit the edit mode by clicking on the blank space. But, where should the onClick go?

My solution was to put it on the entire svg element:

Then, I use stopPropgation for events on inner elements.

--

--

--

I dream in the the heptapod language

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Customize your terminal with aliases

Building a Gigantic Robot Army Using Docker

5 Reasons Why You Should Try Linux

From emptiness to a glance at Web Development…..

Space Shooter Challenge: Powerup Rarity and Weighted Spawn Systems

What’s new in php8.0

Announcing a free Flutter introductory course

What is the difference between C and C++?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jiahao Chen

Jiahao Chen

I dream in the the heptapod language

More from Medium

Animal Farm by George Orwell

CS373 Spring 2022: Kevin Joseph

Meteorological_Data