Skip to content

Commit 540519b

Browse files
committed
ALTV-732 | add clearDrawOrigin
1 parent e183bc5 commit 540519b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

client/src/bindings/RmlDocument.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ static void SetDrawOrigin(const v8::FunctionCallbackInfo<v8::Value>& info)
117117

118118
V8_ARG_TO_VECTOR3(1, origin);
119119
document->SetDrawOrigin(origin);
120+
}
121+
122+
static void ClearDrawOrigin(const v8::FunctionCallbackInfo<v8::Value>& info)
123+
{
124+
V8_GET_ISOLATE_CONTEXT_RESOURCE();
125+
V8_GET_THIS_BASE_OBJECT(document, alt::IRmlDocument);
126+
127+
document->ClearDrawOrigin();
120128
}
121129

122130
static void StaticGetByID(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -166,4 +174,5 @@ extern V8Class v8RmlDocument("RmlDocument",
166174
V8Helpers::SetMethod(isolate, tpl, "createTextNode", &CreateTextNode);
167175

168176
V8Helpers::SetMethod(isolate, tpl, "setDrawOrigin", &SetDrawOrigin);
177+
V8Helpers::SetMethod(isolate, tpl, "clearDrawOrigin", &ClearDrawOrigin);
169178
});

0 commit comments

Comments
 (0)