Fixes a few last points

This commit is contained in:
Steve Ruiz 2021-08-29 14:46:58 +01:00
parent 9e8e99cb6f
commit c35f82bdcf
7 changed files with 22 additions and 2142 deletions

View file

@ -5,6 +5,10 @@ const esbuild = require('esbuild')
const name = process.env.npm_package_name || ''
async function main() {
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist')
}
try {
esbuild.buildSync({
entryPoints: ['./src/index.ts'],

View file

@ -1,17 +1,21 @@
/* eslint-disable */
const fs = require('fs')
const esbuild = require('esbuild')
const name = process.env.npm_package_name || ''
async function main() {
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist')
}
esbuild.build({
entryPoints: ['./src/index.ts'],
outdir: 'dist/cjs',
minify: false,
bundle: true,
format: 'cjs',
target: 'esnext',
target: 'es6',
jsxFactory: 'React.createElement',
jsxFragment: 'React.Fragment',
tsconfig: './tsconfig.json',

View file

@ -5,6 +5,10 @@ const esbuild = require('esbuild')
const name = process.env.npm_package_name || ''
async function main() {
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist')
}
try {
esbuild.buildSync({
entryPoints: ['./src/index.ts'],

View file

@ -1,17 +1,21 @@
/* eslint-disable */
const fs = require('fs')
const esbuild = require('esbuild')
const name = process.env.npm_package_name || ''
async function main() {
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist')
}
esbuild.build({
entryPoints: ['./src/index.ts'],
outdir: 'dist/cjs',
minify: false,
bundle: true,
format: 'cjs',
target: 'esnext',
target: 'es6',
jsxFactory: 'React.createElement',
jsxFragment: 'React.Fragment',
tsconfig: './tsconfig.build.json',

File diff suppressed because it is too large Load diff

View file

@ -103,12 +103,10 @@ export class TLDrawState extends StateManager<Data> {
/* -------------------- Internal -------------------- */
protected onStateWillChange = (state: Data, id: string): void => {
if (id === "reset" || id.startsWith("command")) {
if (!id.startsWith('patch')) {
this.selectHistory.stack = [[]]
this.selectHistory.pointer = 0
}
}
protected onStateDidChange = (state: Data, id: string): void => {