Skip to content

Commit

Permalink
Merge branch 'master' into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Feb 8, 2019
2 parents 5ed4f19 + 7323974 commit e624c4d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
3 changes: 0 additions & 3 deletions packages/actions/drop/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ function install (scope: Scope) {
interaction.dropStatus.events = null
})

interactions.signals.on('new', (interaction) => {
})

interactions.signals.on('stop', ({ interaction: { dropStatus } }) => {
dropStatus.cur.dropzone = dropStatus.cur.element =
dropStatus.prev.dropzone = dropStatus.prev.element = null
Expand Down
18 changes: 10 additions & 8 deletions packages/actions/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Scope } from '@interactjs/core/scope'
import drag from './drag'
import drag, { DragEvent } from './drag'
import drop from './drop'
import gesture from './gesture'
import resize from './resize'
import gesture, { GestureEvent } from './gesture'
import resize, { ResizeEvent } from './resize'

function install (scope: Scope) {
gesture.install(scope)
Expand All @@ -11,11 +11,13 @@ function install (scope: Scope) {
drop.install(scope)
}

export * from './drag'
export * from './resize'
export * from './gesture'
export * from './drop'

export {
gesture,
GestureEvent,
resize,
ResizeEvent,
drag,
DragEvent,
drop,
install,
}
5 changes: 5 additions & 0 deletions packages/actions/resize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ declare module '@interactjs/core/Interaction' {
previous: Interact.Rect
delta: Interact.Rect
}
resizeStartAspectRatio: number
}

interface ActionProps {
_linkedEdges?: { [key: string]: boolean }
}
}

Expand Down
8 changes: 1 addition & 7 deletions packages/modifiers/restrict/edges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ import extend from '@interactjs/utils/extend'
import rectUtils from '@interactjs/utils/rect'
import restrict from './pointer'

declare module '@interactjs/core/Interaction' {
interface ActionProps {
linkedEdges?: { [key: string]: boolean }
}
}

const { getRestrictionRect } = restrict
const noInner = { top: +Infinity, left: +Infinity, bottom: -Infinity, right: -Infinity }
const noOuter = { top: -Infinity, left: -Infinity, bottom: +Infinity, right: +Infinity }
Expand Down Expand Up @@ -51,7 +45,7 @@ function set ({ coords, interaction, state }: {
state: any
}) {
const { offset, options } = state
const edges = interaction.prepared.linkedEdges || interaction.prepared.edges
const edges = interaction.prepared._linkedEdges || interaction.prepared.edges

if (!edges) {
return
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/extend.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default function extend<T, U extends Partial<T>> (dest: U, source: T) {
for (const prop in source) {
dest[prop] = source[prop]
(dest as unknown as T)[prop] = source[prop]
}
return dest as T & U
}
3 changes: 3 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ merge_to_release() {

echo "checking out the '$RELEASE_BRANCH' branch"
git checkout $RELEASE_BRANCH || exit $?
git pull --ff-only

# delete generated .js and d.ts files
npx tsc --build --clean $ROOT
# clear package links
git clean -fdX packages/*
git merge --no-ff --no-edit $INITIAL_BRANCH || quit "failed to merge branches" $?
npx lerna bootstrap || quit "bootstrapping failed" $?
}
Expand Down

0 comments on commit e624c4d

Please sign in to comment.