Skip to content

Instantly share code, notes, and snippets.

View gofpdf_precision.go
func testRender() {
pdf := gofpdf.New("P", "mm", "A3", "")
const x = 200.0
const y = 200.0
const gapAngle = 40.00
const segmAngle = 16.00
const lineWidthOuterRing = 0.20
View jspdf_precision.html
<!DOCTYPE html>
<meta charset="UTF-8">
<title>Title of the document</title>
<script src="" integrity="sha384-NaWTHo/8YCBYJ59830LTz/P4aQZK1sS0SneOgAvhsIl3zBu8r9RevNg5lHCHAuQ/" crossorigin="anonymous"></script>
<h1>Demo for jsPDF precision drawing very small arc dimensions</h1>
View gist:b49c9d9b3ff0f1e9d0da
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<layout-placeholder name="title"/>
<link> tags to include optimized CSS URLs will be included below:
maberer /
Last active Aug 29, 2015
Handling of batched state in react’s diff algorithm

#Some notes / further details based on the excellent article React’s diff algorithm

Assuming that react has batched multiple setState() calls that come from different component nodes (batched, because all calls happend before the js event loop ended), all of the given statements below are TRUE:

  • If multiple setState() calls are batched, react always looks first at the topmost dirty component and starts rendering from there.

  • React renders a tree of components until all dirty components have run/been touched exactly once.