(params: string, uri: string)
| 3024 | } |
| 3025 | |
| 3026 | private _createHyperlink(params: string, uri: string): boolean { |
| 3027 | // It's legal to open a new hyperlink without explicitly finishing the previous one |
| 3028 | if (this._getCurrentLinkId()) { |
| 3029 | this._finishHyperlink(); |
| 3030 | } |
| 3031 | const parsedParams = params.split(':'); |
| 3032 | let id: string | undefined; |
| 3033 | const idParamIndex = parsedParams.findIndex(e => e.startsWith('id=')); |
| 3034 | if (idParamIndex !== -1) { |
| 3035 | id = parsedParams[idParamIndex].slice(3) || undefined; |
| 3036 | } |
| 3037 | this._curAttrData.extended = this._curAttrData.extended.clone(); |
| 3038 | this._curAttrData.extended.urlId = this._oscLinkService.registerLink({ id, uri }); |
| 3039 | this._curAttrData.updateExtended(); |
| 3040 | return true; |
| 3041 | } |
| 3042 | |
| 3043 | private _finishHyperlink(): boolean { |
| 3044 | this._curAttrData.extended = this._curAttrData.extended.clone(); |
no test coverage detected