Skip to content

Commit

Permalink
fix pdf bookmark level
Browse files Browse the repository at this point in the history
  • Loading branch information
Doris Lam committed Jun 17, 2023
1 parent 6af11e4 commit 7e1db50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ve-components/presentations/view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export const ViewComponent: VeComponentOptions = {
<div id="{{$ctrl.mmsElementId}}" ng-class="{landscape: $ctrl.view._printLandscape}">
<div ng-if="!$ctrl.noTitle">
<div ng-if="!$ctrl.mmsLink" >
<h1 class="view-title h{{$ctrl.level}}">
<h1 class="view-title bm-level-{{$ctrl.level}}">
<span class="ve-view-number" ng-show="$ctrl.showNumbering">{{$ctrl.view._veNumber}}</span>
<transclude-name mms-element-id="{{$ctrl.view.id}}" mms-project-id="{{$ctrl.view._projectId}}" mms-ref-id="{{$ctrl.view._refId}}" mms-watch-id="true"></transclude-name>
</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class TranscludeSectionController extends DeletableTransclusion implement
showNumbering: boolean;
noCompile: boolean = true;
//Locals

level: number = 0;
static $inject = [...DeletableTransclusion.$inject, 'PresentationService', 'RootScopeService'];

constructor(
Expand Down Expand Up @@ -129,6 +129,9 @@ export class TranscludeSectionController extends DeletableTransclusion implement
this.growl.warning('There are duplicates in this section, duplicates ignored!');
}
}
if (this.element._veNumber) {
this.level = this.element._veNumber.split('.').length;
}
const deferred = this.$q.defer<string>();
deferred.reject({ status: 200 }); //don't recompile
return deferred.promise;
Expand All @@ -140,7 +143,7 @@ export const TranscludeSectionComponent: VeComponentOptions = {
template: `
<div ng-if="$ctrl.element.specification">
<div ng-show="!$ctrl.isEditing">
<h1 class="section-title h{{$ctrl.level}}">
<h1 class="section-title bm-level-{{$ctrl.level}}">
<span class="ve-view-number" ng-show="$ctrl.showNumbering">{{$ctrl.element._veNumber}}</span> {{$ctrl.element.name}}
</h1>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/ve-utils/application/Utils.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,9 @@ p, div {widows: 2; orphans: 2;}
------------------------------------------------------------------*/
@page:first {@top {content: ''} @bottom {content: ''} @top-left {content: ''} @top-right {content: ''} @bottom-left {content: ''} @bottom-right {content: ''}}
/*------------------------------------------------------------------
8. Signature Box
`;
for (let i = 1; i < 10; i++) {
ret += `.h${i} {-prince-bookmark-level: ${i};}
ret += `.bm-level-${i} {bookmark-level: ${i};}
`;
}
if (htmlFlag) {
Expand Down

0 comments on commit 7e1db50

Please sign in to comment.