iOS: implement Image Pixel
This commit is contained in:
19
doric-web/dist/index.js
vendored
19
doric-web/dist/index.js
vendored
@@ -3328,6 +3328,25 @@ class Image extends View {
|
||||
getImagePixels(context) {
|
||||
return this.nativeChannel(context, "getImagePixels")();
|
||||
}
|
||||
setImagePixels(context, imagePixels) {
|
||||
if (Environment.platform === 'iOS') {
|
||||
imagePixels.pixels = context.function2Id(() => {
|
||||
return imagePixels.pixels;
|
||||
});
|
||||
}
|
||||
return this.nativeChannel(context, "setImagePixels")(imagePixels);
|
||||
}
|
||||
toModel() {
|
||||
const ret = super.toModel();
|
||||
if (Environment.platform === 'iOS') {
|
||||
if (Reflect.has(ret.props, "imagePixels")) {
|
||||
const imagePixels = Reflect.get(ret.props, "imagePixels");
|
||||
const pixels = imagePixels.pixels;
|
||||
imagePixels.pixels = this.callback2Id(() => pixels);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
__decorate$b([
|
||||
Property,
|
||||
|
7
doric-web/dist/index.js.map
vendored
7
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user