Change image storage to use new ExtendedAttrs payload field.

This commit is contained in:
Per Bothner
2026-05-13 11:29:00 -07:00
parent c8c8b3a7fe
commit 8883dc17a7
4 changed files with 73 additions and 154 deletions
+1
View File
@@ -115,6 +115,7 @@ export interface IExtendedAttrs {
underlineColor: number;
underlineVariantOffset: number;
urlId: number;
payload: Object | undefined;
clone(): IExtendedAttrs;
isEmpty(): boolean;
}
+2 -1
View File
@@ -138,6 +138,7 @@ export class AttributeData implements IAttributeData {
*/
export class ExtendedAttrs implements IExtendedAttrs {
private _ext: number = 0;
public payload: Object | undefined;
public get ext(): number {
if (this._urlId) {
return (
@@ -206,6 +207,6 @@ export class ExtendedAttrs implements IExtendedAttrs {
* that needs to be persistant in the buffer.
*/
public isEmpty(): boolean {
return this.underlineStyle === UnderlineStyle.NONE && this._urlId === 0;
return this.underlineStyle === UnderlineStyle.NONE && this._urlId === 0 && this.payload === undefined;
}
}