Prettified Code!
This commit is contained in:
parent
eb83b0e698
commit
ae69fb63f5
35
try.js
35
try.js
|
@ -5,19 +5,19 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import ReactVersion from 'shared/ReactVersion';
|
||||
import {LegacyRoot} from 'react-reconciler/src/ReactRootTags';
|
||||
import * as React from "react";
|
||||
import ReactVersion from "shared/ReactVersion";
|
||||
import { LegacyRoot } from "react-reconciler/src/ReactRootTags";
|
||||
import {
|
||||
createContainer,
|
||||
updateContainer,
|
||||
injectIntoDevTools,
|
||||
} from 'react-reconciler/src/ReactFiberReconciler';
|
||||
import Transform from 'art/core/transform';
|
||||
import Mode from 'art/modes/current';
|
||||
import FastNoSideEffects from 'art/modes/fast-noSideEffects';
|
||||
} from "react-reconciler/src/ReactFiberReconciler";
|
||||
import Transform from "art/core/transform";
|
||||
import Mode from "art/modes/current";
|
||||
import FastNoSideEffects from "art/modes/fast-noSideEffects";
|
||||
|
||||
import {TYPES, childrenAsString} from './ReactARTInternals';
|
||||
import { TYPES, childrenAsString } from "./ReactARTInternals";
|
||||
|
||||
Mode.setCurrent(
|
||||
// Change to 'art/modes/dom' for easier debugging via SVG
|
||||
|
@ -72,7 +72,7 @@ class Surface extends React.Component {
|
|||
null,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
"",
|
||||
);
|
||||
updateContainer(this.props.children, this._mountNode, this);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class Surface extends React.Component {
|
|||
|
||||
return (
|
||||
<Tag
|
||||
ref={ref => (this._tagRef = ref)}
|
||||
ref={(ref) => (this._tagRef = ref)}
|
||||
accessKey={props.accessKey}
|
||||
className={props.className}
|
||||
draggable={props.draggable}
|
||||
|
@ -125,7 +125,7 @@ class Text extends React.Component {
|
|||
super(props);
|
||||
// We allow reading these props. Ideally we could expose the Text node as
|
||||
// ref directly.
|
||||
['height', 'width', 'x', 'y'].forEach(key => {
|
||||
["height", "width", "x", "y"].forEach((key) => {
|
||||
Object.defineProperty(this, key, {
|
||||
get: function () {
|
||||
return this._text ? this._text[key] : undefined;
|
||||
|
@ -137,7 +137,7 @@ class Text extends React.Component {
|
|||
// This means you can't have children that render into strings...
|
||||
const T = TYPES.TEXT;
|
||||
return (
|
||||
<T {...this.props} ref={t => (this._text = t)}>
|
||||
<T {...this.props} ref={(t) => (this._text = t)}>
|
||||
{childrenAsString(this.props.children)}
|
||||
</T>
|
||||
);
|
||||
|
@ -148,20 +148,11 @@ injectIntoDevTools({
|
|||
findFiberByHostInstance: () => null,
|
||||
bundleType: __DEV__ ? 1 : 0,
|
||||
version: ReactVersion,
|
||||
rendererPackageName: 'react-art',
|
||||
rendererPackageName: "react-art",
|
||||
});
|
||||
|
||||
/** API */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const ClippingRectangle = TYPES.CLIPPING_RECTANGLE;
|
||||
export const Group = TYPES.GROUP;
|
||||
export const Shape = TYPES.SHAPE;
|
||||
|
|
Loading…
Reference in New Issue