From 92493f14d7cb308eca7ebea36ca0b551dba1041f Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 28 Nov 2017 16:30:09 +1300 Subject: [PATCH] Miscellaneous JSDoc fixes --- interface/src/ui/overlays/Overlays.h | 6 +++--- libraries/shared/src/PointerEvent.cpp | 2 +- libraries/shared/src/RegisteredMetaTypes.cpp | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/interface/src/ui/overlays/Overlays.h b/interface/src/ui/overlays/Overlays.h index 6561a99d0a..3b35cda7ea 100644 --- a/interface/src/ui/overlays/Overlays.h +++ b/interface/src/ui/overlays/Overlays.h @@ -280,9 +280,9 @@ public slots: * @function Overlays.textSize * @param {Uuid} overlayID - The ID of the overlay to use for calculation. * @param {string} text - The string to calculate the size of. - * @returns {Vec2} The size of the text if the overlay is a text overlay, otherwise - * { x: 0, y: 0 }. If the overlay is a 2D overlay the size is in pixels; if the overlay if a 3D overlay the - * size is in meters. + * @returns {Size} The size of the text if the overlay is a text overlay, otherwise + * { height: 0, width : 0 }. If the overlay is a 2D overlay the size is in pixels; if the overlay if a 3D + * overlay the size is in meters. */ QSizeF textSize(OverlayID id, const QString& text); diff --git a/libraries/shared/src/PointerEvent.cpp b/libraries/shared/src/PointerEvent.cpp index f4da41bcbc..4f4d24639c 100644 --- a/libraries/shared/src/PointerEvent.cpp +++ b/libraries/shared/src/PointerEvent.cpp @@ -49,7 +49,7 @@ PointerEvent::PointerEvent(EventType type, uint32_t id, * @property {number} id - Integer number used to identify the pointer: 0 = hardware mouse, 1 = left * controller, 2 = right controller. * @property {Vec2} pos2D - The 2D position of the event on the intersected overlay or entity XY plane. - * @property {Vec3) pos3D - The 3D position of the event on the intersected overlay or entity. + * @property {Vec3} pos3D - The 3D position of the event on the intersected overlay or entity. * @property {Vec3} normal - The surface normal at the intersection point. * @property {Vec3} direction - The direction of the intersection ray. * @property {string} button - The name of the button pressed: None, Primary, Secondary, diff --git a/libraries/shared/src/RegisteredMetaTypes.cpp b/libraries/shared/src/RegisteredMetaTypes.cpp index fd5237a29a..2d4ad288c2 100644 --- a/libraries/shared/src/RegisteredMetaTypes.cpp +++ b/libraries/shared/src/RegisteredMetaTypes.cpp @@ -826,6 +826,12 @@ void quuidFromScriptValue(const QScriptValue& object, QUuid& uuid) { uuid = fromString; } +/**jsdoc + * A 2D size value. + * @typedef {object} Size + * @property {number} height - The height value. + * @property {number} width - The width value. + */ QScriptValue qSizeFToScriptValue(QScriptEngine* engine, const QSizeF& qSizeF) { QScriptValue obj = engine->newObject(); obj.setProperty("width", qSizeF.width());