Skip to content

Instantly share code, notes, and snippets.

View linghuam's full-sized avatar

linghuam linghuam

View GitHub Profile
@linghuam
linghuam / History|-100e7616|entries.json
Last active February 13, 2023 03:16
vscode settings sync
{"version":1,"resource":"file:///Users/menglinghua/work/cbm-web/web/node_modules/%40tencent/vlego-materials/node_modules/%40tencent/panshi-framework/src/types/ExportFile.ts","entries":[{"id":"WRKs.ts","source":"searchReplace.source","timestamp":1668590968874}]}
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
export default function (context) {
var devicePixelRatio = window.devicePixelRatio || 1;
context.canvas.width = context.canvas.width * devicePixelRatio;
context.canvas.height = context.canvas.height * devicePixelRatio;
context.canvas.style.width = context.canvas.width / devicePixelRatio + 'px';
context.canvas.style.height = context.canvas.height / devicePixelRatio + 'px';
context.scale(devicePixelRatio, devicePixelRatio);
}
@linghuam
linghuam / requrestAnimationFrame.js
Created February 6, 2018 07:50
requrestAnimationFrame
var requrestAnimationFrame = window.requrestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
};
import {svgCreate} from '../layer/vector/SVG.Util';
/*
* @namespace Browser
* @aka L.Browser
*
* A namespace with static properties for browser/feature detection used by Leaflet internally.
*
* @example
*