--[=[
	Observes percent visibility
	@param basicPane BasicPane
	@return Observable<number>
]=]

function BasicPaneUtils.observePercentVisible(basicPane)
	assert(BasicPane.isBasicPane(basicPane), "Bad BasicPane")

	return BasicPaneUtils.observeVisible(basicPane):Pipe({
		Rx.map(function(visible)
			return visible and 1 or 0
		end);
		Rx.startWith({0}); -- Ensure fade in every time.
	})
end
