Merge pull request #14580 from Snuffleupagus/PixelsPerInch-class
Change `PixelsPerInch` to a class with `static` properties (issue 14579)
This commit is contained in:
		
						commit
						65d679a3a6
					
				@ -22,7 +22,6 @@ import {
 | 
				
			|||||||
import {
 | 
					import {
 | 
				
			||||||
  BaseException,
 | 
					  BaseException,
 | 
				
			||||||
  isString,
 | 
					  isString,
 | 
				
			||||||
  shadow,
 | 
					 | 
				
			||||||
  stringToBytes,
 | 
					  stringToBytes,
 | 
				
			||||||
  Util,
 | 
					  Util,
 | 
				
			||||||
  warn,
 | 
					  warn,
 | 
				
			||||||
@ -30,15 +29,13 @@ import {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const SVG_NS = "http://www.w3.org/2000/svg";
 | 
					const SVG_NS = "http://www.w3.org/2000/svg";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const PixelsPerInch = {
 | 
					class PixelsPerInch {
 | 
				
			||||||
  CSS: 96.0,
 | 
					  static CSS = 96.0;
 | 
				
			||||||
  PDF: 72.0,
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /** @type {number} */
 | 
					  static PDF = 72.0;
 | 
				
			||||||
  get PDF_TO_CSS_UNITS() {
 | 
					
 | 
				
			||||||
    return shadow(this, "PDF_TO_CSS_UNITS", this.CSS / this.PDF);
 | 
					  static PDF_TO_CSS_UNITS = this.CSS / this.PDF;
 | 
				
			||||||
  },
 | 
					}
 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
class DOMCanvasFactory extends BaseCanvasFactory {
 | 
					class DOMCanvasFactory extends BaseCanvasFactory {
 | 
				
			||||||
  constructor({ ownerDocument = globalThis.document } = {}) {
 | 
					  constructor({ ownerDocument = globalThis.document } = {}) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user