설명 없음

index.ts 618B

1234567891011121314151617181920
  1. import { eventHub } from './../src/event/EventHub';
  2. import { WhitePage } from './../src/board/WhitePage/index';
  3. const page1 = new WhitePage(document.getElementById('image1') as HTMLImageElement, { eventHub });
  4. page1.drawboard.show((dataUrl: string) => {
  5. const res = document.getElementById('resultImage') as HTMLImageElement;
  6. res.src = dataUrl;
  7. });
  8. const page2 = new WhitePage(document.getElementById('image2') as HTMLImageElement, {
  9. mode: 'mirror',
  10. eventHub
  11. });
  12. page2.drawboard.show((dataUrl: string) => {
  13. const res = document.getElementById('resultImage') as HTMLImageElement;
  14. res.src = dataUrl;
  15. });