new Credit(html, showOnScreen)
版权声明包含与如何在屏幕上显示某些内容的归属/版权声明有关的数据。
| Name | Type | Default | Description |
|---|---|---|---|
html |
String |
可选
表示html代码片段的字符串。 |
|
showOnScreen |
Boolean | false |
可选
如果为true,版权声明将在主版权声明中可见,否则会出现在弹窗中。 |
Throws:
-
需要使用 html。
- Type
- DeveloperError
Example
//Create a credit with a tooltip, image and link
Members
-
readonly elementHTMLElement
-
获取版权声明元素
-
readonly htmlString
-
版权声明内容。
-
readonly showOnScreenBoolean
-
版权声明应该显示在屏幕上还是弹窗中。
Methods
-
static clone(credit){Credit}
-
复制版权声明实例。
Name Type Description creditCredit 可选 要复制的版权声明。
Returns:
Type Description Credit 新的版权声明实例与所提供的实例重复。(如果版权声明未定义则返回未定义)。 -
static equals(left, right){Boolean}
-
如果版权声明相等,则返回true
Name Type Description leftCredit 左侧第一个版权声明。
rightCredit 右侧第二个版权声明。
Returns:
Type Description Boolean 左右相等则返回true,否则返回false。 -
equals(Credit){Boolean}
-
如果版权声明相等,则返回true。
Name Type Description CreditCredit 版权声明之间比较。
Returns:
Type Description Boolean 如果左右相等则返回true,否则返回false。