From 87be62f9e4bbf990b63a1f4bed3939276cfd6a92 Mon Sep 17 00:00:00 2001 From: Pablo Guardiola Date: Thu, 23 Feb 2017 19:47:40 +0100 Subject: [android] fix units in runtime styling javadoc (#8161) --- .../java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java | 8 ++++---- platform/android/scripts/generate-style-code.js | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java index 61944c961e..03980e6a8b 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java @@ -375,7 +375,7 @@ public class PropertyFactory { } /** - * Blur applied to the line, in pixels. + * Blur applied to the line, in density-independent pixels. * * @param value a Float value * @return property wrapper around Float @@ -386,7 +386,7 @@ public class PropertyFactory { /** - * Blur applied to the line, in pixels. + * Blur applied to the line, in density-independent pixels. * * @param the function input type * @param function a wrapper function for Float @@ -397,7 +397,7 @@ public class PropertyFactory { } /** - * Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. + * Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to density-independent pixels, multiply the length by the current line width. * * @param value a Float[] value * @return property wrapper around Float[] @@ -408,7 +408,7 @@ public class PropertyFactory { /** - * Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. + * Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to density-independent pixels, multiply the length by the current line width. * * @param the zoom parameter type * @param function a wrapper {@link CameraFunction} for Float[] diff --git a/platform/android/scripts/generate-style-code.js b/platform/android/scripts/generate-style-code.js index 32458b1876..09563f3b9d 100644 --- a/platform/android/scripts/generate-style-code.js +++ b/platform/android/scripts/generate-style-code.js @@ -158,7 +158,10 @@ global.defaultValueJava = function(property) { * Produces documentation for property factory methods */ global.propertyFactoryMethodDoc = function (property) { - let doc = property.doc; + var replaceIfPixels = function (doc) { + return doc.replace('pixels', 'density-independent pixels') + } + let doc = replaceIfPixels(property.doc); // Match other items in back ticks doc = doc.replace(/`(.+?)`/g, function (m, symbol, offset, str) { if (str.substr(offset - 4, 3) !== 'CSS' && symbol[0].toUpperCase() != symbol[0] && _(enumProperties).filter({'name': symbol}).value().length > 0) { -- cgit v1.2.1