mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-23 08:00:51 +01:00
added some method to get data from legacy data type using offsets
This commit is contained in:
parent
81cfd5c56f
commit
52db7aa550
@ -14,7 +14,6 @@ export class LegacyDataType extends ObjectDataBase implements IObjectData
|
|||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this._data = '';
|
this._data = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,6 +46,11 @@ export class LegacyDataType extends ObjectDataBase implements IObjectData
|
|||||||
return this._data;
|
return this._data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getLegacyStringWithOffset(offset: number)
|
||||||
|
{
|
||||||
|
return this._data.split('\n')[offset];
|
||||||
|
}
|
||||||
|
|
||||||
public compare(data: IObjectData): boolean
|
public compare(data: IObjectData): boolean
|
||||||
{
|
{
|
||||||
return (this._data === data.getLegacyString());
|
return (this._data === data.getLegacyString());
|
||||||
|
Loading…
Reference in New Issue
Block a user