Skip to content

Bugfix/drag element check #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 83 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
d628a24
Header and footer section
mohanraj-86 Oct 9, 2020
0646ceb
Footer section
mohanraj-86 Oct 9, 2020
85899e9
Alignment to use as standard for IPG
mohanraj-86 Oct 9, 2020
8462188
format
mohanraj-86 Oct 9, 2020
19e4636
Read me fiel update
mohanraj-86 Oct 9, 2020
2fd792a
Merge pull request #4 from clarivate/mohan/customize_interface
fradiablo Oct 9, 2020
73184fa
Font style changes
mohanraj-86 Oct 13, 2020
d2f664d
alternate approach for cursor change
mohanraj-86 Oct 13, 2020
527ab6a
prefix path name with @clarivate
fradiablo Oct 13, 2020
43b76df
use cdk dragdrop to remove ghosts from active drag event
Oct 13, 2020
ff4935a
review comment
mohanraj-86 Oct 14, 2020
d7bd65d
Merge pull request #7 from clarivate/kd/remove-ghosts
mohanraj-86 Oct 14, 2020
cad429d
Added grabbing cursor
mohanraj-86 Oct 14, 2020
40e1f1e
Image on top of buttons, reset when we change images
mohanraj-86 Oct 15, 2020
07ca12f
Merge pull request #5 from clarivate/mohan/customize_interface
mohanraj-86 Oct 15, 2020
94bee82
fix cdx version
Oct 15, 2020
7a7ca08
cdk package
mohanraj-86 Oct 16, 2020
2ce5c35
Merge pull request #8 from clarivate/mohan/customize_interface
mohanraj-86 Oct 16, 2020
3fd243d
Merge pull request #6 from clarivate/fix-path-for-local-lib-path
mohanraj-86 Oct 16, 2020
55f3e04
wip
Oct 16, 2020
8e67220
fix cdx version
Oct 15, 2020
3c56f89
use container for dragdrop, fix cdx version
Oct 15, 2020
3688951
Merge branch 'kd/de-sync-scale,rotate-and-cdk' of https://github.com/…
mohanraj-86 Oct 19, 2020
f72fc7d
cleanup
Oct 19, 2020
a5fffa2
Merge branch 'kd/de-sync-scale,rotate-and-cdk' of https://github.com/…
mohanraj-86 Oct 19, 2020
3305437
fix reset method
Oct 19, 2020
97970ce
Merge branch 'kd/de-sync-scale,rotate-and-cdk' of https://github.com/…
mohanraj-86 Oct 19, 2020
9125320
Image should be one top of buttons.
mohanraj-86 Oct 19, 2020
d056e49
fix reset on next image
Oct 19, 2020
0a2a4dc
fix reset
Oct 19, 2020
0432d6a
Merge pull request #9 from clarivate/kd/de-sync-scale,rotate-and-cdk
kdimatteo Oct 19, 2020
eee1a1b
Clean up and localization support
mohanraj-86 Oct 20, 2020
f185a67
Merge pull request #10 from clarivate/mohan/customize_interface
kdimatteo Oct 20, 2020
d3199ec
[TI-53368] Adding fix for image fit with in the section
muthu-clarivate Oct 21, 2020
2f98522
Merge pull request #11 from clarivate/muthu/stylework
kdimatteo Oct 21, 2020
9a868ca
v1.3.0
Oct 22, 2020
0a7a58f
Merge pull request #12 from clarivate/kd/fix-tsconfig-path
kdimatteo Oct 22, 2020
0bf7ca2
Image viewer redesign
muthu-clarivate Oct 27, 2020
4d6a12e
v1.2.11-ng7
Oct 27, 2020
c77a158
fix canNavigate null checks
Oct 27, 2020
063c604
wip
Oct 28, 2020
99674a8
revert packages
Oct 28, 2020
0f3b0fa
revert package
Oct 28, 2020
9166eec
Merge pull request #14 from clarivate/kd/merge-1.2.12-ng7-to-master
kdimatteo Oct 28, 2020
fb4d731
1.4.0
Oct 28, 2020
9831179
removed image name
muthu-clarivate Nov 2, 2020
9971155
Removed image name
mohanraj-86 Nov 2, 2020
8438a5d
1.5.0
Nov 2, 2020
0dd1d33
v1.5.0
Nov 2, 2020
e1ee15f
Merge pull request #15 from clarivate/muthu/new-design-change
mohanraj-86 Nov 4, 2020
645c865
bump version to 1.6.0
fradiablo Nov 4, 2020
451dd26
added missing image name input with other changes, upgraded to AngV9
May 18, 2021
8b90c35
Merge pull request #16 from clarivate/workarea/praveen
pravinsharma-in May 19, 2021
08b14f5
fixes as per 1.2.12-ng7
Jul 29, 2021
156a0fe
Merge pull request #17 from clarivate/workarea/praveen
pravinsharma-in Jul 29, 2021
14dfa28
patch version revamped
Jul 29, 2021
6438276
Merge pull request #18 from clarivate/workarea/praveen
pravinsharma-in Jul 29, 2021
f3fe471
FF bug fix
Jul 29, 2021
5038073
Merge pull request #19 from clarivate/workarea/praveen
pravinsharma-in Jul 29, 2021
4861efc
incrementing patch version due to unpublish issue
Jul 29, 2021
0ec73bc
Merge pull request #20 from clarivate/workarea/praveen
pravinsharma-in Jul 29, 2021
87ae8c4
Add .circleci/config.yml
kdimatteo Jul 29, 2021
8b388f1
patch increased due to unpublish issue
Jul 29, 2021
0d12f19
Merge pull request #22 from clarivate/workarea/praveen
pravinsharma-in Jul 29, 2021
2fc3823
Merge pull request #21 from clarivate/circleci-project-setup
kdimatteo Jul 29, 2021
0497870
2.0.4
Jul 29, 2021
0f8877f
circleci to publish
Jul 29, 2021
ee10ac9
.
Jul 29, 2021
54c9675
Merge pull request #23 from clarivate/workarea/praveen
pravinsharma-in Jul 29, 2021
d2a71d7
2.0.5
Jul 29, 2021
f70322d
2.0.6
Jul 29, 2021
0e89001
2.0.7
Jul 29, 2021
4fa3830
path to ng
Jul 29, 2021
8c99257
Updates
Aug 17, 2021
d64cc21
update docs from ci
Aug 17, 2021
e350dbf
Update angular-image-viewer.component.ts
venu369 Nov 23, 2021
0641ee9
Merge pull request #25 from Venu963/task/image-viewer
kdimatteo Nov 23, 2021
a583705
update deps
Nov 23, 2021
61b6dc4
test transfer
pravinsharma Dec 2, 2024
fe14e5d
Adding support for Angular 14
pravinsharma Dec 2, 2024
c26005f
Version changed to 3.0.0
mohanraj-86 Dec 3, 2024
9477684
Merge pull request #33 from clarivate/angular-14
mohanraj-86 Dec 3, 2024
29c7600
code fix applied
pravinsharma Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions browserslist → .browserslistrc
Original file line number Diff line number Diff line change
@@ -2,11 +2,15 @@
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
67 changes: 67 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check {{ '/2.0/language-javascript/' | docs_url }} for more details
#
version: 2

defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:10.13

jobs:
test:
<<: *defaults
steps:
- checkout

- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- dependencies-

- run: npm install
- run:
name: Run tests
command: echo 'noop'

- save_cache:
paths:
- node_modules
key: dependencies-{{ checksum "package.json" }}

- persist_to_workspace:
root: ~/repo
paths: .
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Build the package
command: node_modules/.bin/ng build angular-image-viewer --prod
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc
- run:
name: Publish package
command: npm publish dist/angular-image-viewer/

workflows:
version: 2
test-deploy:
jobs:
- test:
filters:
tags:
only: /^v.*/
- deploy:
requires:
- test
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -8,6 +8,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
20 changes: 11 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
# Compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
# Node
/node_modules
npm-debug.log
yarn-error.log

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
.angular

# System Files
# System files
.DS_Store
Thumbs.db
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@

demo: https://clarivate.github.io/angular-image-viewer/

A configurable Angular image viewer component, compatible with Angular 8
A configurable Angular image viewer component, compatible with Angular 14

## Features:
* Compatible with Angular 8
* Compatible with Angular 14
* Configurable
* Rotate image
* Zoom image
@@ -61,10 +61,12 @@ The configuration object is structured as below. All values are optional, and if
{
btnClass: 'default', // The CSS class(es) that will apply to the buttons
zoomFactor: 0.1, // The amount that the scale will be increased by
containerBackgroundColor: '#ccc', // The color to use for the background. This can provided in hex, or rgb(a).
containerBackgroundColor: '#e4dede', // The color to use for the background. This can provided in hex, or rgb(a).
primaryColor: '', // Color to use for all buttons image.
wheelZoom: true, // If true, the mouse wheel can be used to zoom in
allowFullscreen: true, // If true, the fullscreen button will be shown, allowing the user to enter fullscreen mode
allowKeyboardNavigation: true, // If true, the left / right arrow keys can be used for navigation
isZoomPersistent: false, // if true, keeps zoom persistent across image exploration
btnIcons: { // The icon classes that will apply to the buttons. By default, font-awesome is used.
zoomIn: 'fa fa-plus',
zoomOut: 'fa fa-minus',
@@ -106,6 +108,13 @@ handleEvent(event: customImageEvent) {
}
```

## Local setup for this branch:

* Add respective version of this component. yarn add @clarivate/angular-image-viewer.
* yarn serve-lib is to compile your changes in projects\angular-image-viewer and it will update in dist folder. But to reflect in UI, update projects\angular-image-viewer\ng-package.json file dest to node_module location. "dest": "../../node_modules/@clarivate/angular-image-viewer",
* yarn start to get the application up.


Note: This package is built using the idea from ngx-image-viewer(https://github.com/jpilfold/ngx-image-viewer). It has advantage that it uses latest dependencies which fixes Issue #23 & #29 i.e related to FullScreen Image.


116 changes: 43 additions & 73 deletions angular.json
Original file line number Diff line number Diff line change
@@ -8,6 +8,9 @@
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
@@ -17,63 +20,65 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/example-image-viewer",
"outputPath": "dist/ngx-image-viewer",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ngx-image-viewer:build"
},
"configurations": {
"production": {
"browserTarget": "ngx-image-viewer:build:production"
},
"development": {
"browserTarget": "ngx-image-viewer:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -88,45 +93,16 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
"src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ngx-image-viewer:serve"
},
"configurations": {
"production": {
"devServerTarget": "ngx-image-viewer:serve:production"
}
}
},
"deploy": {
"builder": "angular-cli-ghpages:deploy",
"options": {}
}
}
},
@@ -137,16 +113,19 @@
"prefix": "angular",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/angular-image-viewer/tsconfig.lib.json",
"project": "projects/angular-image-viewer/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/angular-image-viewer/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/angular-image-viewer/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
@@ -155,21 +134,12 @@
"tsConfig": "projects/angular-image-viewer/tsconfig.spec.json",
"karmaConfig": "projects/angular-image-viewer/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/angular-image-viewer/tsconfig.lib.json",
"projects/angular-image-viewer/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ngx-image-viewer"
"defaultProject": "ngx-image-viewer",
"cli": {
"analytics": false
}
}
Loading