Note that you need to hold down 'ctrl' to zoom.
Restrict panning and zooming to a box the size of the canvas:
canvas.panlimit(['cx', 'cy']).zoomlimit([1, 3])
canvas.node(1).add({ pos: ['-cx+35', 'cy-35'], fixed: true })
canvas.node(2).add({ pos: ['cx-35', 'cy-35'], fixed: true })
canvas.node(3).add({ pos: ['-cx+35', '-cy+35'], fixed: true })
canvas.node(4).add({ pos: ['cx-35', '-cy+35'], fixed: true })
canvas.edges([[1, 2], [2, 4], [4, 3], [3, 1]]).add()