Appearance
KBE3D / KBCore / Cesium / Credit
类: Credit
A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
示例
ts
// Create a credit with a tooltip, image and link
const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" style="vertical-align: -7px" title="Cesium"/></a>');参数
An string representing an html code snippet
参数
If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover. All credits are displayed inline, if you have an image we recommend sizing it correctly to match the text or use css to vertical-align it.
属性
html
readonlyhtml:string
The credit content
showOnScreen
showOnScreen:
boolean
Whether the credit should be displayed on screen or in a lightbox
element
readonlyelement:HTMLElement
Gets the credit element
方法
equals()
staticequals(left?:Credit,right?:Credit):boolean
Returns true if the credits are equal
参数
left?
Credit
The first credit
right?
Credit
The second credit
返回
boolean
true if left and right are equal, false otherwise.
clone()
staticclone(credit?:Credit):Credit
Duplicates a Credit instance.
参数
credit?
Credit
The Credit to duplicate.
返回
Credit
A new Credit instance that is a duplicate of the one provided. (Returns undefined if the credit is undefined)
equals()
equals(
credit?:Credit):boolean
Returns true if the credits are equal
参数
credit?
Credit
The credit to compare to.
返回
boolean
true if left and right are equal, false otherwise.
构造函数
构造函数
new Credit(
html:string,showOnScreen?:boolean):Credit
参数
html
string
showOnScreen?
boolean
返回
Credit
