INNER CODE UNIT · JavaScript

firstZoom

CloudWise-OpenSource/FlyFish · lcapCodeServer/linux/lib/vscode/extensions/image-preview/media/main.js:139

	function firstZoom() {
		if (!image || !hasLoadedImage) {
			return;
		}

		scale = image.clientWidth / image.naturalWidth;
		updateScale(scale);
	}

	function zoomIn() {
		if (scale === 'fit') {
			firstZoom();
		}

		let i = 0;
		for (; i < zoomLevels.length; ++i) {
			if (zoomLevels[i] > scale) {
				break;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…