mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 21:42:30 -05:00
commit
f2e090e293
23 changed files with 23 additions and 22 deletions
|
@ -27,6 +27,7 @@
|
|||
"react-dom": "^16"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scratch/paper": "~0.11.6",
|
||||
"autoprefixer": "7.1.2",
|
||||
"babel-cli": "6.26.0",
|
||||
"babel-core": "^6.23.1",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import log from '../../log/log';
|
||||
import BroadBrushHelper from './broad-brush-helper';
|
||||
import SegmentBrushHelper from './segment-brush-helper';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Broadbrush based on http://paperjs.org/tutorials/interaction/working-with-mouse-vectors/
|
||||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import {stylePath} from '../../helper/style-path';
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import {stylePath} from '../../helper/style-path';
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
|
|
|
@ -11,7 +11,7 @@ import {performUndo, performRedo, performSnapshot} from '../helper/undo';
|
|||
import Modes from '../modes/modes';
|
||||
import {connect} from 'react-redux';
|
||||
import bindAll from 'lodash.bindall';
|
||||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
class PaintEditor extends React.Component {
|
||||
constructor (props) {
|
||||
|
|
|
@ -2,7 +2,7 @@ import bindAll from 'lodash.bindall';
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
import {performSnapshot} from '../helper/undo';
|
||||
import {undoSnapshot} from '../reducers/undo';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import {getRootItem, isGroupItem} from './item';
|
||||
import {clearSelection, getSelectedRootItems, setItemSelection} from './selection';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import {getGuideLayer} from './layer';
|
||||
import {getAllRootItems} from './selection';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import {isBoundsItem, getRootItem} from './item';
|
||||
import {hoverBounds, hoverItem} from './guides';
|
||||
import {isGroupChild} from './group';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
const getRootItem = function (item) {
|
||||
if (item.parent.className === 'Layer') {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
const getGuideLayer = function () {
|
||||
for (let i = 0; i < paper.project.layers.length; i++) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
const checkPointsClose = function (startPos, eventPoint, threshold) {
|
||||
const xOff = Math.abs(startPos.x - eventPoint.x);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import keyMirror from 'keymirror';
|
||||
|
||||
import {getSelectedRootItems} from '../selection';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import {snapDeltaToAngle} from '../math';
|
||||
import {clearSelection, getSelectedLeafItems} from '../selection';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import log from '../../log/log';
|
||||
import keyMirror from 'keymirror';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
/**
|
||||
* Tool to handle rotation when dragging the rotation handle in the bounding box tool.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
/**
|
||||
* Tool to handle scaling items by pulling on the handles around the edges of the bounding
|
||||
|
|
|
@ -4,7 +4,7 @@ import {getHoveredItem} from '../hover';
|
|||
import {deleteSelection, selectRootItem} from '../selection';
|
||||
import BoundingBoxTool from './bounding-box-tool';
|
||||
import SelectionBoxTool from './selection-box-tool';
|
||||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
/**
|
||||
* paper.Tool that handles select mode. This is made up of 2 subtools.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import Modes from '../modes/modes';
|
||||
|
||||
import {getItemsGroup, isGroup} from './group';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
import {getSelectedLeafItems} from './selection';
|
||||
import {isPGTextItem, isPointTextItem} from './item';
|
||||
import {isGroup} from './group';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// undo functionality
|
||||
// modifed from https://github.com/memononen/stylii
|
||||
import paper from 'paper';
|
||||
import paper from '@scratch/paper';
|
||||
|
||||
const performSnapshot = function (dispatchPerformSnapshot) {
|
||||
dispatchPerformSnapshot({
|
||||
|
|
Loading…
Reference in a new issue