"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/common/src/ViewContainer.tsx" between
fullcalendar-5.9.0.tar.gz and fullcalendar-5.10.0.tar.gz

About: FullCalendar is a full-sized drag & drop JavaScript event calendar.

ViewContainer.tsx  (fullcalendar-5.9.0):ViewContainer.tsx  (fullcalendar-5.10.0)
import { BaseComponent, setRef } from './vdom-util' import { BaseComponent, setRef } from './vdom-util'
import { ComponentChildren, Ref, createElement, VUIEvent } from './vdom' import { ComponentChildren, Ref, createElement } from './vdom'
import { CssDimValue } from './scrollgrid/util' import { CssDimValue } from './scrollgrid/util'
export interface ViewContainerProps { export interface ViewContainerProps {
labeledById: string
liquid?: boolean liquid?: boolean
height?: CssDimValue height?: CssDimValue
aspectRatio?: number aspectRatio?: number
onClick?: (ev: VUIEvent) => void
elRef?: Ref<HTMLDivElement> elRef?: Ref<HTMLDivElement>
children?: ComponentChildren children?: ComponentChildren
} }
interface ViewContainerState { interface ViewContainerState {
availableWidth: number | null availableWidth: number | null
} }
// TODO: do function component? // TODO: do function component?
export class ViewContainer extends BaseComponent<ViewContainerProps, ViewContain erState> { export class ViewContainer extends BaseComponent<ViewContainerProps, ViewContain erState> {
skipping to change at line 55 skipping to change at line 55
// BETTER: don't start rendering ANYTHING yet until we know container wi dth // BETTER: don't start rendering ANYTHING yet until we know container wi dth
// NOTE: why not always use paddingBottom? Causes height oscillation (is sue 5606) // NOTE: why not always use paddingBottom? Causes height oscillation (is sue 5606)
paddingBottom = `${(1 / aspectRatio) * 100}%` paddingBottom = `${(1 / aspectRatio) * 100}%`
} }
} else { } else {
height = props.height || '' height = props.height || ''
} }
return ( return (
<div <div
aria-labelledby={props.labeledById}
ref={this.handleEl} ref={this.handleEl}
onClick={props.onClick}
className={classNames.join(' ')} className={classNames.join(' ')}
style={{ height, paddingBottom }} style={{ height, paddingBottom }}
> >
{props.children} {props.children}
</div> </div>
) )
} }
componentDidMount() { componentDidMount() {
this.context.addResizeHandler(this.handleResize) this.context.addResizeHandler(this.handleResize)
 End of changes. 5 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)