refactor dcaseviewer.ts and gsnshape.ts