adding setposition method

fixed src/CaseViewer.js