using Node instead of cc.Node (#4998)

This commit is contained in:
jiaxin.lai
2019-07-26 18:17:57 +08:00
committed by pandamicro
parent faa7094cf8
commit c0cccd08f9
@@ -42,7 +42,7 @@ import { UITransformComponent } from '../ui-transfrom-component';
import { EditBoxImpl } from './edit-box-impl';
import { InputFlag, InputMode, KeyboardReturnType } from './types';
import { INode } from '../../../../core/utils/interfaces';
import { Node } from '../../../../scene-graph';
import { Node } from '../../../../scene-graph/node';
const LEFT_PADDING = 2;
@@ -644,9 +644,9 @@ export class EditBoxComponent extends Component {
}
if (!this._placeholderLabel) {
let node = this.node.getChildByName('PLACEHOLDER_LABEL') as INode;
let node = this.node.getChildByName('PLACEHOLDER_LABEL');
if (!node) {
node = new cc.Node('PLACEHOLDER_LABEL') as INode;
node = new Node('PLACEHOLDER_LABEL') as INode;
}
let placeholderLabel = node!.getComponent(LabelComponent);
if (!placeholderLabel) {