Fixes a few last points
This commit is contained in:
parent
9e8e99cb6f
commit
c35f82bdcf
7 changed files with 22 additions and 2142 deletions
|
@ -5,6 +5,10 @@ const esbuild = require('esbuild')
|
||||||
const name = process.env.npm_package_name || ''
|
const name = process.env.npm_package_name || ''
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
if (!fs.existsSync('./dist')) {
|
||||||
|
fs.mkdirSync('./dist')
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
esbuild.buildSync({
|
esbuild.buildSync({
|
||||||
entryPoints: ['./src/index.ts'],
|
entryPoints: ['./src/index.ts'],
|
||||||
|
|
|
@ -1,17 +1,21 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
const fs = require('fs')
|
||||||
const esbuild = require('esbuild')
|
const esbuild = require('esbuild')
|
||||||
|
|
||||||
const name = process.env.npm_package_name || ''
|
const name = process.env.npm_package_name || ''
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
if (!fs.existsSync('./dist')) {
|
||||||
|
fs.mkdirSync('./dist')
|
||||||
|
}
|
||||||
|
|
||||||
esbuild.build({
|
esbuild.build({
|
||||||
entryPoints: ['./src/index.ts'],
|
entryPoints: ['./src/index.ts'],
|
||||||
outdir: 'dist/cjs',
|
outdir: 'dist/cjs',
|
||||||
minify: false,
|
minify: false,
|
||||||
bundle: true,
|
bundle: true,
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
target: 'esnext',
|
target: 'es6',
|
||||||
jsxFactory: 'React.createElement',
|
jsxFactory: 'React.createElement',
|
||||||
jsxFragment: 'React.Fragment',
|
jsxFragment: 'React.Fragment',
|
||||||
tsconfig: './tsconfig.json',
|
tsconfig: './tsconfig.json',
|
||||||
|
|
|
@ -5,6 +5,10 @@ const esbuild = require('esbuild')
|
||||||
const name = process.env.npm_package_name || ''
|
const name = process.env.npm_package_name || ''
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
if (!fs.existsSync('./dist')) {
|
||||||
|
fs.mkdirSync('./dist')
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
esbuild.buildSync({
|
esbuild.buildSync({
|
||||||
entryPoints: ['./src/index.ts'],
|
entryPoints: ['./src/index.ts'],
|
||||||
|
|
|
@ -1,17 +1,21 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
const fs = require('fs')
|
||||||
const esbuild = require('esbuild')
|
const esbuild = require('esbuild')
|
||||||
|
|
||||||
const name = process.env.npm_package_name || ''
|
const name = process.env.npm_package_name || ''
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
if (!fs.existsSync('./dist')) {
|
||||||
|
fs.mkdirSync('./dist')
|
||||||
|
}
|
||||||
|
|
||||||
esbuild.build({
|
esbuild.build({
|
||||||
entryPoints: ['./src/index.ts'],
|
entryPoints: ['./src/index.ts'],
|
||||||
outdir: 'dist/cjs',
|
outdir: 'dist/cjs',
|
||||||
minify: false,
|
minify: false,
|
||||||
bundle: true,
|
bundle: true,
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
target: 'esnext',
|
target: 'es6',
|
||||||
jsxFactory: 'React.createElement',
|
jsxFactory: 'React.createElement',
|
||||||
jsxFragment: 'React.Fragment',
|
jsxFragment: 'React.Fragment',
|
||||||
tsconfig: './tsconfig.build.json',
|
tsconfig: './tsconfig.build.json',
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -103,12 +103,10 @@ export class TLDrawState extends StateManager<Data> {
|
||||||
/* -------------------- Internal -------------------- */
|
/* -------------------- Internal -------------------- */
|
||||||
|
|
||||||
protected onStateWillChange = (state: Data, id: string): void => {
|
protected onStateWillChange = (state: Data, id: string): void => {
|
||||||
|
if (!id.startsWith('patch')) {
|
||||||
if (id === "reset" || id.startsWith("command")) {
|
|
||||||
this.selectHistory.stack = [[]]
|
this.selectHistory.stack = [[]]
|
||||||
this.selectHistory.pointer = 0
|
this.selectHistory.pointer = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected onStateDidChange = (state: Data, id: string): void => {
|
protected onStateDidChange = (state: Data, id: string): void => {
|
||||||
|
|
Loading…
Reference in a new issue