[android] fix units in runtime styling javadoc (#8161)

This commit is contained in:
Pablo Guardiola
2017-02-23 19:47:40 +01:00
committed by GitHub
parent d2469f4bdb
commit 87be62f9e4
2 changed files with 8 additions and 5 deletions

View File

@@ -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 <T> 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 <Z> the zoom parameter type
* @param function a wrapper {@link CameraFunction} for Float[]

View File

@@ -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) {