Browse Source

longer wait for canvas

Gaëtan Renaudeau 5 years ago
parent
commit
c90ce5e9c3
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      example/src/Canvas.js

+ 1
- 1
example/src/Canvas.js View File

18
     ctx.fillRect(120, 30, 60, 60);
18
     ctx.fillRect(120, 30, 60, 60);
19
     ctx.fillStyle = 'blue';
19
     ctx.fillStyle = 'blue';
20
     ctx.fillRect(140, 50, 60, 60);
20
     ctx.fillRect(140, 50, 60, 60);
21
-    const timeout = setTimeout(onDrawn, 500); // hack. react-native-canvas have no way to tell when it's executed
21
+    const timeout = setTimeout(onDrawn, 1000); // hack. react-native-canvas have no way to tell when it's executed
22
     return () => clearTimeout(timeout);
22
     return () => clearTimeout(timeout);
23
   }, []);
23
   }, []);
24
   return <Canvas ref={ref} style={dimension} />;
24
   return <Canvas ref={ref} style={dimension} />;