15832144755
2022-01-06 7b4c8991dca9cf2a809a95e239d144697d3afb56
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { defaultValue } from "../Source/Cesium.js";
 
var canvasCount = 0;
 
function createCanvas(width, height) {
  width = defaultValue(width, 1);
  height = defaultValue(height, 1);
 
  var canvas = document.createElement("canvas");
  canvas.id = "canvas" + canvasCount++;
  canvas.setAttribute("width", width);
  canvas.setAttribute("clientWidth", width);
  canvas.setAttribute("height", height);
  canvas.setAttribute("clientHeight", height);
  canvas.innerHTML =
    "To view this web page, upgrade your browser; it does not support the HTML5 canvas element.";
  document.body.appendChild(canvas);
 
  return canvas;
}
export default createCanvas;