Skip to content

Commit

Permalink
Created IHyperLink as fix for Issue #758
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbrent committed Jun 3, 2020
1 parent 2140643 commit 489abe8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added: Auto-Paging finally comes to `addTable()` [\#262](https://github.com/gitbrent/PptxGenJS/issues/262) ([okaiyong](https://github.com/okaiyong))
- Added: Background image for slides (deprecated `bkgd:string` with `background:BkgdOpts`) [\#610](https://github.com/gitbrent/PptxGenJS/pull/610) ([thomasowow](https://github.com/thomasowow))
### Changed
- Fixed `colW` length mismatch with colspans (Issue #651) [\#679](https://github.com/gitbrent/PptxGenJS/issues/679) ([Joshua-rose](https://github.com/Joshua-rose))
- Fixed: Type defs for `TableCell.text` not correct ([gitbrent](https://github.com/gitbrent))
- Fixed: tableToSlides `addHeaderToEach` finally duplicates all header rows, not just the first one [\#262](https://github.com/gitbrent/PptxGenJS/issues/262) ([okaiyong](https://github.com/okaiyong))
- Fixed `colW` length mismatch with colspans (Issue #651) [\#679](https://github.com/gitbrent/PptxGenJS/issues/679) ([Joshua-rose](https://github.com/Joshua-rose))
- Fixed: hyperlink and tooltip property `rId` is not working? [\#758](https://github.com/gitbrent/PptxGenJS/issues/758) ([kuldeept70](https://github.com/kuldeept70))
- Fixed: type defs for `TableCell.text` not correct ([gitbrent](https://github.com/gitbrent))
- Fixed: type defs for `ITableOptions` s/b `TableOptions` ([gitbrent](https://github.com/gitbrent))
### WIP
- [Text with align adds linebreaks](https://github.com/gitbrent/PptxGenJS/issues?q=is%3Aissue+is%3Aopen+label%3Atext)

Expand Down
12 changes: 7 additions & 5 deletions src/core-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export type MediaType = 'audio' | 'online' | 'video'
export type ChartAxisTickMark = 'none' | 'inside' | 'outside' | 'cross'
export type ShapeFill = Color | { type: string; color: Color; alpha?: number }
export type HyperLink = {
rId: number
slide?: number
tooltip?: string
url?: string
tooltip?: string
}
export interface IHyperLink extends HyperLink {
rId: number
}
export type BkgdOpts = {
fill?: HexColor
Expand Down Expand Up @@ -284,7 +286,7 @@ export interface IChartOptsLib extends IChartOpts {
export interface IImageOpts extends PositionOptions, OptsDataOrPath {
type?: 'audio' | 'online' | 'video'
sizing?: { type: 'crop' | 'contain' | 'cover'; w: number; h: number; x?: number; y?: number }
hyperlink?: HyperLink
hyperlink?: IHyperLink
rounding?: boolean
placeholder?: any
rotate?: number
Expand Down Expand Up @@ -465,7 +467,7 @@ export interface ITextOpts extends PositionOptions, OptsDataOrPath, TextOptions
charSpacing?: number
fill?: ShapeFill
glow?: IGlowOptions
hyperlink?: HyperLink
hyperlink?: IHyperLink
indentLevel?: number
inset?: number
isTextBox?: boolean
Expand Down Expand Up @@ -620,7 +622,7 @@ export interface ISlideObject {
// image:
image?: string
imageRid?: number
hyperlink?: HyperLink
hyperlink?: IHyperLink
// media
media?: string
mtype?: MediaType
Expand Down
1 change: 0 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,6 @@ declare namespace PptxGenJS {
export type ChartAxisTickMark = 'none' | 'inside' | 'outside' | 'cross'
export type ShapeFill = Color | { type: string; color: Color; alpha?: number }
export type HyperLink = {
rId: number
slide?: number
tooltip?: string
url?: string
Expand Down

0 comments on commit 489abe8

Please sign in to comment.