vendredi 14 juin 2019

How should I design the my javascript object hierarchy?

I have several table cells object(i.e.ShiftCell,CursoredShiftCell,Preferred ShiftCell, EditableShiftCell).

For each type of table cell object, some features are required to implement. However, some features common to more than 1 type of cell object. I want to use the javascript inheritance feature to keep consistency. Here is my requirement:

enter image description here

I have tried the solution stated in "ES6 Class Multiple inheritance". Unfortunately, some event handler and the input parameter of some constructor become undefine. So, I get lost on how to design the object hierarchy.

Aucun commentaire:

Enregistrer un commentaire