diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-11-01 16:20:35 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-11-11 18:20:01 +0200 |
commit | 8bbc7d9290218a65a86d51748838175cdb7379f9 (patch) | |
tree | 668850d96bc38ac7d564ad653417c9d925d10f14 /platform/node | |
parent | c6f3cc8b60e0cff032020a780d4fd3de1cb2a112 (diff) | |
download | qtlocation-mapboxgl-8bbc7d9290218a65a86d51748838175cdb7379f9.tar.gz |
[node] Add support for Image expression
Diffstat (limited to 'platform/node')
-rw-r--r-- | platform/node/src/node_expression.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/node/src/node_expression.cpp b/platform/node/src/node_expression.cpp index 81d5c74767..7e59847da9 100644 --- a/platform/node/src/node_expression.cpp +++ b/platform/node/src/node_expression.cpp @@ -42,7 +42,8 @@ type::Type parseType(v8::Local<v8::Object> type) { {"color", type::Color}, {"value", type::Value}, {"formatted", type::Formatted}, - {"number-format", type::String}}; + {"number-format", type::String}, + {"resolvedImage", type::Image}}; v8::Local<v8::Value> v8kind = Nan::Get(type, Nan::New("kind").ToLocalChecked()).ToLocalChecked(); std::string kind(*v8::String::Utf8Value(v8kind)); @@ -220,6 +221,8 @@ struct ToValue { return scope.Escape(result); } + + v8::Local<v8::Value> operator()(const Image& image) { return toJS(image.toValue()); } }; v8::Local<v8::Value> toJS(const Value& value) { |