This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function dragElement(elmnt, dragElement = elmnt) { | |
let pos1 = 0; | |
let pos2 = 0; | |
let pos3 = 0; | |
let pos4 = 0; | |
dragElement.onmousedown = dragMouseDown; | |
function dragMouseDown(e) { | |
e = e || window.event; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let size = prompt("size?"); | |
for(let i=1; i<=size; i++) console.log("#".repeat(i)); | |
let size = prompt("size?") | |
for(let i=1; i<= size; i++){ | |
let buffer = ' '.repeat(size-i) | |
let side = '#'.repeat(i-1) | |
console.log(`${buffer}${side} ${side}${buffer}`); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Dropzone from 'react-dropzone' | |
import { act, fireEvent, render, waitFor } from '@testing-library/react' | |
test('invoke onDragEnter when dragenter event occurs', async () => { | |
const file = new File([ | |
JSON.stringify({ping: true}) | |
], 'ping.json', { type: 'application/json' }) | |
const data = mockData([file]) | |
const onDragEnter = jest.fn() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const loadImage = src => | |
new Promise((resolve, reject) => { | |
const img = new Image(); | |
img.onload = () => resolve(img); | |
img.onerror = reject; | |
img.src = src; | |
}); |
OlderNewer